Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. using (DirectoryEntry de = new DirectoryEntry(ldapPath, ldapUsername, password, AuthenticationTypes.ServerBind)) {
  2. try {
  3. // Bind to the native AdsObject to force authentication.
  4. object obj = de.NativeObject;//not IDisposable
  5. } catch(...
  6.  
  7. * "LDAP://server.uri:636"
  8. * "LDAP://insecure.server.uri:389"
  9. * "LDAP://server.uri:636/cn=username,ou=staff,o=myOrganisation,c=org"
  10.  
  11. * "cn=username,ou=staff,o=myOrganisation,c=org"
Add Comment
Please, Sign In to add comment