i keep getting error in webconfig dunno why. im trying use ad authentication in asp.net c# website
<authentication mode="forms"> <forms name=".adauthcookie" timeout="10" loginurl="login.aspx" defaulturl="default.aspx"> </forms> </authentication> <authorization> <deny users="?" /> <allow users="*" /> </authorization> <membership defaultprovider="domainloginmembershipprovider"> <providers> <add name="domainloginmembershipprovider" type="system.web.security.activedirectorymembershipprovider, system.web, version=2.0.0.0,culture=neutral, publickeytoken=b03f5f7f11d50a3a" connectionstringname="adconnectionstring" connectionusername="username" connectionpassword="password"/> </providers> </membership> </configuration>
your error message self explanatory. can see screen shot have included authentication
section directly inside configuration
node should present inside system.web
node. web.config should this:-
<configuration> <system.web> <authentication mode="forms"> <forms name=".adauthcookie" timeout="10" loginurl="login.aspx" defaulturl="default.aspx"> </forms> </authentication> ...others </system.web> <connectionstrings> <add name="connectionstring" .....others </configuration>
Comments
Post a Comment