1

I am following the link

http://geekswithblogs.net/frankw/archive/2008/05/18/forms-authentication-with-active-directory-in-asp.net-2.0.aspx

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 ?

Macnique
  • 1,028
  • 2
  • 19
  • 44

1 Answers1

1

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)

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Hum, [Apache Directory-Studio](http://directory.apache.org/studio/) is a good tool as far Directory is concern (it's pure java) ;o) – JPBlanc Oct 26 '11 at 19:17
  • @marc_s I didn't use the browser but the code worked out well.Thank you. – Macnique Oct 27 '11 at 19:42