public ConectLdap() { ldap = new ReadWriterConfig().ReadConfigLdap(); string path = ldap.UrlLdap + "/" + ldap.BindLdap; entry = new DirectoryEntry(path, ldap.BindDn, ldap.BindCredential, AuthenticationTypes.FastBind); }
public bool Connect(LdapField ldap) { bool result = false; try { string path = ldap.UrlLdap + "/" + ldap.BindLdap; entry = new DirectoryEntry(path, ldap.BindDn, ldap.BindCredential, AuthenticationTypes.FastBind); } catch { result = false; } return(result); }
public bool checkLdapServer(LdapField ldap) { bool result = false; try { string path = ldap.UrlLdap + "/" + ldap.BindLdap; DirectoryEntry directoryEntry = new DirectoryEntry(path, userName, password, AuthenticationTypes.FastBind); object nativeObject = directoryEntry.NativeObject; result = true; } catch (DirectoryServicesCOMException) { } return(result); }
public bool Connect() { bool result = true; try { ldap = new ReadWriterConfig().ReadConfigLdap(); string path = ldap.UrlLdap + "/" + ldap.BindLdap; entry = new DirectoryEntry(path, ldap.BindDn, ldap.BindCredential, AuthenticationTypes.FastBind); } catch { result = false; } return(result); }