开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜