I am seeking a way to switch between 2 connection strings in the web.config file for a C# web, database & report server application. I was hoping to be able to construct the connection sting based on what web server is being used ( i.e. a production server or a development server). I wanted to use the same connetion string name in both cases, just put in the correct database name & password. Is this possible ? Suggestions ?
views:
10answers:
1
+1
Q:
How to switch between 2 servers in the web.config file dynamically for MS VS2005 C# .Net 2.0 ?
A:
In Visual Studio 2010, Config Transforms are the way to go.
However,
Since you're looking at Visual Studio 2005, you might take a look at this blog post from Scott Hanselman.
kbrimington
2010-08-16 23:28:09