2013-06-27 30 views
0

我想域鍵和值添加到我的web.config的LDAP認證,但加入將節添加到web.config時將配置節是什麼?

<domain> 
    <add key="don" value="fffT"/> 
    <add key="LD" value="LDAP://n.tt.sg/DC=ttt,DC=xx,DC=exxxx,DC=sg"/> 
</domain> 

它顯示的錯誤could not find schema information of value and key時。我應該寫什麼,而不是

<section name="domain" type="System.Configuration.NameValueFileSectionHandler,System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 

回答

0

做這樣

<configuration> 
<appSettings> 
<add key="don" value="fffT"/> 
<add key="LD" value="LDAP://n.tt.sg/DC=ttt,DC=xx,DC=exxxx,DC=sg"/> 
</appSettings> 
</configuration> 

把鑰匙和價值觀裏面appSettings科web.confing

0

System.Configuration.NameValueFileSectionHandler是從System組裝,而不是System.Web.Extensions

type="System.Configuration.NameValueFileSectionHandler, System, Version=3.5.0.0,   Culture=neutral, PublicKeyToken=b77a5c561934e089"