WebConfigurationManager和ConfigurationManager之间有什么区别?
我什么时候应该使用另一个?
更新
我只是查看了WebConfigurationManager,由于某种原因,您无法像在ConfigurationManager中那样访问连接字符串(如数组).谁能告诉我为什么MS这样做了?使用WebConfigurationManager获取所需的连接字符串似乎很痛苦.
再次更新CAVEAT!
如果您没有引用添加到项目中的"System.Configuration"命名空间,那么当您尝试访问WebConfigurationManager.ConnectionStrings时,Visual Studio将显示错误!
.net c# asp.net configurationmanager webconfigurationmanager