LdapConnection Class
TOC
Collapse the table of content
Expand the table of content

LdapConnection Class

 

The LdapConnection class creates a TCP/IP or UDP LDAP connection to Microsoft Active Directory Domain Services or an LDAP server.

Namespace:   System.DirectoryServices.Protocols
Assembly:  System.DirectoryServices.Protocols (in System.DirectoryServices.Protocols.dll)

System.Object
  System.DirectoryServices.Protocols.DirectoryConnection
    System.DirectoryServices.Protocols.LdapConnection

public class LdapConnection : DirectoryConnection, IDisposable

NameDescription
System_CAPS_pubmethodLdapConnection(LdapDirectoryIdentifier)

The LdapConnection(LdapDirectoryIdentifier) constructor creates an instance of the LdapConnection class using the specified directory identifier. The logon credentials and the Negotiate Authentication are used to connect to the LDAP server.

System_CAPS_pubmethodLdapConnection(LdapDirectoryIdentifier, NetworkCredential)

The LdapConnection(LdapDirectoryIdentifier, NetworkCredential) constructor creates an instance of the LdapConnection class using the specified directory identifier and network credentials. Negotiate Authentication is used.

System_CAPS_pubmethodLdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

The LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) constructor creates an instance of the LdapConnection class using the specified directory identifier, network credentials, and authentication type.

System_CAPS_pubmethodLdapConnection(String)

The LdapConnection(String) constructor creates an instance of the LdapConnection class using the specified server.

NameDescription
System_CAPS_pubpropertyAuthType

The AuthType property contains the supported authentication types.

System_CAPS_pubpropertyAutoBind

The AutoBind property specifies whether an automatic bind is allowed.

System_CAPS_pubpropertyClientCertificates

The ClientCertificates property specifies one or more client certificates to send for authentication.(Inherited from DirectoryConnection.)

System_CAPS_pubpropertyCredential

The Credential property contains the network credentials for the object.(Overrides DirectoryConnection.Credential.)

System_CAPS_pubpropertyDirectory

The Directory property specifies the domain or the server to which the connection should be made.(Inherited from DirectoryConnection.)

System_CAPS_pubpropertySessionOptions

The SessionOptions property contains an LdapSessionOptions object that specifies the session options.

System_CAPS_pubpropertyTimeout

The Timeout property contains the length of time, in seconds, before the LdapConnection times out.(Overrides DirectoryConnection.Timeout.)

NameDescription
System_CAPS_pubmethodAbort(IAsyncResult)

The Abort method cancels the asynchronous request.

System_CAPS_pubmethodBeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object)

The BeginSendRequest method sends data asynchronously to the server.

System_CAPS_pubmethodBeginSendRequest(DirectoryRequest, TimeSpan, PartialResultProcessing, AsyncCallback, Object)

The BeginSendRequest method sends data asynchronously to the server.

System_CAPS_pubmethodBind()

The Bind() method sends an LDAP bind using the current credentials.

System_CAPS_pubmethodBind(NetworkCredential)

The Bind(NetworkCredential) method sends an LDAP bind using the specified NetworkCredential.

System_CAPS_pubmethodDispose()

The Dispose() method closes and releases the LDAP handle.

System_CAPS_protmethodDispose(Boolean)

The Dispose(Boolean) method closes the connection and optionally releases the LDAP handle.

System_CAPS_pubmethodEndSendRequest(IAsyncResult)

The EndSendRequest method completes an asynchronous request.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

The LdapConnection.Finalize method allows an LdapConnection object to attempt to free resources and perform other cleanup operations before the LdapConnection object is reclaimed by garbage collection.(Overrides Object.Finalize().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetPartialResults(IAsyncResult)

The GetPartialResults method retrieves partial results of an asynchronous operation.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSendRequest(DirectoryRequest)

The SendRequest method sends a single DirectoryRequest as an LDAP v3 operation.(Overrides DirectoryConnection.SendRequest(DirectoryRequest).)

System_CAPS_pubmethodSendRequest(DirectoryRequest, TimeSpan)

The SendRequest method sends a single DirectoryRequest as an LDAP v3 operation.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

If the ClientCertificates property on the LdapConnection object and QueryClientCertificate property on the LdapSessionOptions object are both set, the certificate specified in the ClientCertificates property is ignored.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft