DirectoryEntry entry = new DirectoryEntry("LDAP://" + ldapserver + ":" + ldapport + "/" + ldapbasedn, ldapuser, ldappassword, AuthenticationTypes.None); //Open Active Directory with LDAP Connection String/Path with Credentials //DirectoryEntry entry = new DirectoryEntry("LDAP://" + ldapserver + "/" + ldapbasedn, ldapuser, ldappassword, AuthenticationTypes.None); DirectorySearcher ds = new DirectorySearcher(entry); //ds.Filter=("(objectClass=*)"); //ds.SearchScope = SearchScope.Subtree; //ds.Filter = "(cn=orgPerson)"; //Search how you want. Google "LDAP Filter" for more. // ds.Filter = "(&(objectClass=top)(l=" + CertificateAttributeType + "))"; //ds.Filter = "(uid=personUID)"; //Fetch all Attributes in the LDAP Server SearchResultCollection result = ds.FindAll();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)