【发布时间】:2012-07-26 12:35:54
【问题描述】:
如何阅读 web.config 中的个人部分?
<MyPersonalSection>
<add name="toto" enable="true" URL="http://localhost:43242" />
<add name="titi" enable="false" URL="http://localhost:98762" />
<MyPersonalSection/>
我想用名称值获取启用值和/或 URL 值。
我也有这个错误:Unrecognized configuration section MyPersonalSection
我一直在努力
var config = ConfigurationManager.GetSection("MyPersonalSection");
【问题讨论】:
标签: c# .net web web-config