LdapConnection LdapConnection LdapConnection LdapConnection Class

定義

LdapConnection 類別會建立對 Microsoft Active Directory 網域服務或 LDAP 伺服器的 TCP/IP 或 UDP LDAP 連接。The LdapConnection class creates a TCP/IP or UDP LDAP connection to Microsoft Active Directory Domain Services or an LDAP server.

public ref class LdapConnection : System::DirectoryServices::Protocols::DirectoryConnection, IDisposable
public class LdapConnection : System.DirectoryServices.Protocols.DirectoryConnection, IDisposable
type LdapConnection = class
    inherit DirectoryConnection
    interface IDisposable
Public Class LdapConnection
Inherits DirectoryConnection
Implements IDisposable
繼承
實作

備註

如果ClientCertificates上的屬性LdapConnection物件並QueryClientCertificate上的屬性LdapSessionOptions物件會同時設定,在指定的憑證ClientCertificates屬性會被忽略。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.

建構函式

LdapConnection(LdapDirectoryIdentifier) LdapConnection(LdapDirectoryIdentifier) LdapConnection(LdapDirectoryIdentifier) LdapConnection(LdapDirectoryIdentifier)

LdapConnection(LdapDirectoryIdentifier) 建構函式使用指定的目錄識別項,建立 LdapConnection 類別的執行個體。The LdapConnection(LdapDirectoryIdentifier) constructor creates an instance of the LdapConnection class using the specified directory identifier. 登入認證和交涉驗證 (Negotiate Authentication) 用於對 LDAP 伺服器的連接。The logon credentials and the Negotiate Authentication are used to connect to the LDAP server.

LdapConnection(LdapDirectoryIdentifier, NetworkCredential) LdapConnection(LdapDirectoryIdentifier, NetworkCredential) LdapConnection(LdapDirectoryIdentifier, NetworkCredential) LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential) 建構函式使用指定的目錄識別項和網路認證,建立 LdapConnection 類別的執行個體。The LdapConnection(LdapDirectoryIdentifier, NetworkCredential) constructor creates an instance of the LdapConnection class using the specified directory identifier and network credentials. 使用交涉驗證。Negotiate Authentication is used.

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) 建構函式使用指定的目錄識別項、網路認證和驗證類型,建立 LdapConnection 類別的執行個體。The LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) constructor creates an instance of the LdapConnection class using the specified directory identifier, network credentials, and authentication type.

LdapConnection(String) LdapConnection(String) LdapConnection(String) LdapConnection(String)

LdapConnection(String) 建構函式會使用指定的伺服器,建立 LdapConnection 類別的執行個體。The LdapConnection(String) constructor creates an instance of the LdapConnection class using the specified server.

屬性

AuthType AuthType AuthType AuthType

AuthType 屬性包含受支援的驗證類型。The AuthType property contains the supported authentication types.

AutoBind AutoBind AutoBind AutoBind

AutoBind 屬性指定是否允許自動繫結。The AutoBind property specifies whether an automatic bind is allowed.

ClientCertificates ClientCertificates ClientCertificates ClientCertificates

ClientCertificates 屬性會指定傳送一或多個用戶端憑證以進行驗證。The ClientCertificates property specifies one or more client certificates to send for authentication.

(Inherited from DirectoryConnection)
Credential Credential Credential Credential

Credential 屬性包含物件的網路認證。The Credential property contains the network credentials for the object.

Directory Directory Directory Directory

Directory 屬性會指定要連接到的網域或伺服器。The Directory property specifies the domain or the server to which the connection should be made.

(Inherited from DirectoryConnection)
SessionOptions SessionOptions SessionOptions SessionOptions

SessionOptions 屬性包含指定工作階段 (Session) 選項的 LdapSessionOptions 物件。The SessionOptions property contains an LdapSessionOptions object that specifies the session options.

Timeout Timeout Timeout Timeout

Timeout 屬性包含 LdapConnection 逾時之前所經過的時間長度 (以秒為單位)。The Timeout property contains the length of time, in seconds, before the LdapConnection times out.

方法

Abort(IAsyncResult) Abort(IAsyncResult) Abort(IAsyncResult) Abort(IAsyncResult)

Abort(IAsyncResult) 方法會取消非同步要求。The Abort(IAsyncResult) method cancels the asynchronous request.

BeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object) BeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object) BeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object) BeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object)

將資料非同步地傳送至伺服器。Sends data asynchronously to the server.

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

將資料非同步地傳送至伺服器。Sends data asynchronously to the server.

Bind() Bind() Bind() Bind()

Bind() 方法會使用目前認證傳送 LDAP 繫結。The Bind() method sends an LDAP bind using the current credentials.

Bind(NetworkCredential) Bind(NetworkCredential) Bind(NetworkCredential) Bind(NetworkCredential)

Bind(NetworkCredential) 方法會使用指定的 NetworkCredential 傳送 LDAP 繫結。The Bind(NetworkCredential) method sends an LDAP bind using the specified NetworkCredential.

Dispose() Dispose() Dispose() Dispose()

Dispose() 方法會關閉並釋放 LDAP 控制代碼。The Dispose() method closes and releases the LDAP handle.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Dispose(Boolean) 方法會關閉連接並選擇性地釋放 LDAP 控制代碼。The Dispose(Boolean) method closes the connection and optionally releases the LDAP handle.

EndSendRequest(IAsyncResult) EndSendRequest(IAsyncResult) EndSendRequest(IAsyncResult) EndSendRequest(IAsyncResult)

EndSendRequest(IAsyncResult) 方法會完成非同步要求。The EndSendRequest(IAsyncResult) method completes an asynchronous request.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

Finalize() 方法允許 LdapConnection 物件嘗試釋放資源並執行其他清除作業,然後記憶體回收才能重新回收 LdapConnection 物件。The 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.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetPartialResults(IAsyncResult) GetPartialResults(IAsyncResult) GetPartialResults(IAsyncResult) GetPartialResults(IAsyncResult)

GetPartialResults(IAsyncResult) 方法會擷取非同步作業的部分結果。The GetPartialResults(IAsyncResult) method retrieves partial results of an asynchronous operation.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
SendRequest(DirectoryRequest) SendRequest(DirectoryRequest) SendRequest(DirectoryRequest) SendRequest(DirectoryRequest)

SendRequest(DirectoryRequest) 方法會將單一的 DirectoryRequest 當成 LDAP v3 作業傳送。The SendRequest(DirectoryRequest) method sends a single DirectoryRequest as an LDAP v3 operation.

SendRequest(DirectoryRequest, TimeSpan) SendRequest(DirectoryRequest, TimeSpan) SendRequest(DirectoryRequest, TimeSpan) SendRequest(DirectoryRequest, TimeSpan)

SendRequest(DirectoryRequest, TimeSpan) 方法會將單一的 DirectoryRequest 當成 LDAP v3 作業傳送。The SendRequest(DirectoryRequest, TimeSpan) method sends a single DirectoryRequest as an LDAP v3 operation.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於