0
votes

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, [email protected] and when I search active directory in windows there is not any [email protected] help me...why I cant at least authenticate through my username!?

1

1 Answers

0
votes

Authentication with active directory means windows authentication, so first of all, you need to set

<authentication mode="Windows"> instead of <authentication mode="Forms">