Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LdapConnection _connection = new LdapConnection(new LdapDirectoryIdentifier(m_DomainName, m_PortNo));
- _connection.Timeout = TimeSpan.FromMinutes(10);
- _connection.SessionOptions.ProtocolVersion = 3;
- _connection.SessionOptions.SecureSocketLayer = true;
- _connection.SessionOptions.VerifyServerCertificate = (ldapCon, serverCertificate) =>
- {
- //TODO: Verify server certificate
- return true;
- };
- _connection.SessionOptions.QueryClientCertificate = (con, trustedCAs) => null;
- _connection.AuthType = AuthType.Basic;
- _connection.Credential = new NetworkCredential(m_UserName, m_Password);
- _connection.Bind();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement