Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (DirectoryEntry de = new DirectoryEntry(ldapPath, ldapUsername, password, AuthenticationTypes.ServerBind)) {
- try {
- // Bind to the native AdsObject to force authentication.
- object obj = de.NativeObject;//not IDisposable
- } catch(...
- * "LDAP://server.uri:636"
- * "LDAP://insecure.server.uri:389"
- * "LDAP://server.uri:636/cn=username,ou=staff,o=myOrganisation,c=org"
- * "cn=username,ou=staff,o=myOrganisation,c=org"
Add Comment
Please, Sign In to add comment