开发者

storing multiple connection string in xml file asp.net

Based on company and unit selected by开发者_运维知识库 user i have to select connection string. I want to know what is the best practice to store multiple connection string. Should i store it in XML file or web.config file? or at any other place.

Thank you very much


We have some legacy systems that run different databases, than our "official" system. I have always stored the different connection strings in the webconfig, and selected the one I need, in my code.

ConnectionString = WebConfigurationManager.ConnectionStrings["PDM"].ConnectionString;

Personally, I would keep it all in web.config.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜