I am following the link
Trying to implement the same in my application.I am confused about the LDAP connection string beacause i don't have any .com as domain.I do have simple domain like this "aaa-bbbb.xxxx".
I m trying this way "LDAP://ipaddress/cn=users,dc=aaa-bbbb,dc=xxxx" and
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString" connectionUsername="Username" connectionPassword="Password"/>
</providers>
</membership>
but i am unable to validate the user ?
You can easily find out what your LDAP paths look like - just go to LDAP://RootDSE
and checkout the various properties there.
Either use some code:
DirectoryEntry deRoot = new DirectoryEntry("LDAP://RootDSE");
if (deRoot != null)
{
string defNamingCtx = deRoot.Properties["defaultNamingContext"].Value.ToString();
Console.WriteLine("Default naming context: {0}", defNamingCtx);
}
or a tool like my Beavertail ADSI Browser (written in 100% C# code, and freely available)