Connection String Problem

asp.net , db , xml Chicoutimi-Jonquière, Canada
  • 12 years ago

    Hi all,

    At present I am using a connection string stored in my web.config file. What I want to know is that, when I deploy this appication on another network(intranet), how can I manage this connection string?

    Certain issues related to this are:

    - In my web application I have an option to create a new company. If a new company is created, I want that the blank database should be created with the company name. how this is possbile and in this case how I'll manage my connection string?

    Regards,

    Royal

  • 12 years ago

    The web.config is an xml file and I think there are a few 3th party tools that you can buy to work with it on a live server. But I would not do that because I believe that anytime you change your web.config you force your whole site to recompile.

    I think the best way to handle these database connections is to put them in a main database. Which is a smart way to do it anyway it makes managing these other companies alot easyer. You can create a class that will pull the right database connection from the main database for each companies.

  • 12 years ago

    Thanks Freon. I am working on it, if I get struct at any point I'll get back to you.

    Regards,

    Royal

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson