• Question

  • User-1409181380 posted

    I have to connect to an LDAP server to authenticate users when the log into a web application. Unfortunately I am a novice when it comes to LDAP. I have given a sample procedure written in PHP that I can use a template. However I have a couple of questions of how things translate from PHP to .NET and the DirectoryServices.


     ldap_connect and ldap_bind:

    is this the equivalent of using New DirectoryEntry(<server_name>)? or are there also two statements to connect and bind



    how can i specify the search base (root) from which to begin the search?



    how to I get the DN for an entry that was found using ldap_search.


    Any help or pointers would be greatly appreciated?

    Tuesday, August 29, 2006 8:59 PM

All replies

  • User1297008538 posted

    LDAP_Connect and LDAP_Bind are collectively the DirectoryEntry class. You specify the path, username, and password in the DirectoryEntry constructor.

     LDAP_Search is the DirectorySearcher class. You pass a DirectoryEntry which represents the search root to the constructor of the DirectorySearcher.

    LDAP_Get_DN, the DirectorySearcher FindAll() method returns a collection of SearchResult objects of which one property is Path.

    Sunday, September 3, 2006 6:34 PM