I want to authenticate users using active directory..but when i want to login it fails. this is my web.config:
<add name="ADConnectionString" connectionString="LDAP://IPAddress/CN=Users,DC=domain,DC=net"/>
<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", connectionStringName="ADConnectionString" enableSearchMethods="true" connectionUsername="domain.net\myuser" connectionPassword="mypassword"/>
</providers>
</membership>
and also when I use asp.net configuration to see the users, there is only one user, domaincontroller@domain.net and when I search active directory in windows there is not any domaincontroller@doamin.net...please help me...why I cant at least authenticate through my username!?
使用活动目录进行身份验证意味着Windows身份验证,因此首先,您需要设置
<authentication mode="Windows"> instead of <authentication mode="Forms">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.