Last post Sep 03, 2006 06:34 PM by bdesmond
Aug 29, 2006 08:59 PM|rimmey14|LINK
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?
Sep 03, 2006 06:34 PM|bdesmond|LINK
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.