我在对System.Web标签之间我的web.config文件中的以下两个配置文件属性:无法从web.config访问自定义配置文件属性?
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="CustomerName" allowAnonymous="true"/>
<add name="CustomerID" allowAnonymous="true"/>
</properties>
</profile>
当我尝试从aspx.cs文件访问Profile.CustomerName或Profile.CustomerID,它没有出现。我想当你创建一个自定义配置文件属性时,它会自动更新aspnetdb的新属性。配置文件也不会在智能感知中显示。
检查下面 – 2012-08-08 08:46:01