語言

LdapConnection 類別

定義

LdapConnection 類別會建立一個 TCP/IP 或 UDP LDAP 連線,連接至 Microsoft Active Directory 網域服務 或 LDAP 伺服器。

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
繼承
LdapConnection
實作

備註

如果ClientCertificates物件LdapConnection上的QueryClientCertificate屬性和物件上的屬性LdapSessionOptions都設定為設定,則屬性中ClientCertificates指定的憑證會被忽略。

建構函式

名稱 Description
LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)建構子會使用指定的目錄識別碼、網路憑證和認證類型來建立該LdapConnection類別的實例。

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)建構子會使用指定的目錄識別碼和網路憑證建立該LdapConnection類別的實例。 使用協商驗證(Negotiate Authentication)。

LdapConnection(LdapDirectoryIdentifier)

LdapConnection(LdapDirectoryIdentifier)建構子會使用指定的目錄識別碼建立該LdapConnection類別的實例。 登入憑證與協商認證用於連接 LDAP 伺服器。

LdapConnection(String)

LdapConnection(String)建構子會利用指定的伺服器建立該LdapConnection類別的實例。

屬性

名稱 Description
AuthType

該 AuthType 屬性包含支援的認證類型。

AutoBind

該 AutoBind 性質規定是否允許自動綁定。

ClientCertificates

取得一個或多個客戶端憑證以進行驗證。

(繼承來源 DirectoryConnection)
Credential

屬性包含 Credential 該物件的網路憑證。

Directory

取得應該連線的網域或伺服器。

(繼承來源 DirectoryConnection)
SessionOptions

該 SessionOptions 屬性包含一個 LdapSessionOptions 指定會話選項的物件。

Timeout

該 Timeout 屬性包含在超時結束前 LdapConnection 的時間長度(以秒數計)。

方法

名稱 Description
Abort(IAsyncResult)

此 Abort(IAsyncResult) 方法會取消非同步請求。

BeginSendRequest(DirectoryRequest, PartialResultProcessing, AsyncCallback, Object)

非同步地將資料傳送到伺服器。

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

非同步地將資料傳送到伺服器。

Bind()

此 Bind() 方法會使用目前的憑證發送 LDAP 綁定。

Bind(NetworkCredential)

該 Bind(NetworkCredential) 方法會使用指定的 NetworkCredentialLDAP 綁定 。

Dispose()

此 Dispose() 方法會關閉並釋放 LDAP 手柄。

Dispose(Boolean)

此 Dispose(Boolean) 方法會關閉連線,並可選擇性地釋放 LDAP 代柄。

EndSendRequest(IAsyncResult)

該 EndSendRequest(IAsyncResult) 方法會完成一個非同步請求。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
Finalize()

此 Finalize() 方法允許 LdapConnection 物件嘗試釋放資源並執行其他清理操作,然後再透過 LdapConnection 垃圾回收回收物件。

GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetPartialResults(IAsyncResult)

此 GetPartialResults(IAsyncResult) 方法可擷取非同步操作的部分結果。

GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
SendRequest(DirectoryRequest, TimeSpan)

此 SendRequest(DirectoryRequest, TimeSpan) 方法以 LDAP v3 操作形式傳送單一 DirectoryRequest 訊息。

SendRequest(DirectoryRequest)

此 SendRequest(DirectoryRequest) 方法以 LDAP v3 操作形式傳送單一 DirectoryRequest 訊息。

ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於