开发者

How to switch between 2 servers in the web.config file dynamically for MS VS2005 C# .Net 2.0?

开发者 https://www.devze.com 2023-01-12 08:05 出处:网络
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

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.开发者_如何学JAVA Is this possible ? Suggestions ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消