LdapConnection 建構函式

定義

建立 LdapConnection 類別的執行個體。

多載

LdapConnection(LdapDirectoryIdentifier)

LdapConnection(LdapDirectoryIdentifier) 建構函式使用指定的目錄識別項,建立 LdapConnection 類別的執行個體。 登入認證和交涉驗證 (Negotiate Authentication) 用於對 LDAP 伺服器的連接。

LdapConnection(String)

LdapConnection(String) 建構函式會使用指定的伺服器,建立 LdapConnection 類別的執行個體。

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential) 建構函式使用指定的目錄識別項和網路認證,建立 LdapConnection 類別的執行個體。 使用交涉驗證。

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) 建構函式使用指定的目錄識別項、網路認證和驗證類型,建立 LdapConnection 類別的執行個體。

LdapConnection(LdapDirectoryIdentifier)

來源:
LdapConnection.cs
來源:
LdapConnection.cs
來源:
LdapConnection.cs

LdapConnection(LdapDirectoryIdentifier) 建構函式使用指定的目錄識別項,建立 LdapConnection 類別的執行個體。 登入認證和交涉驗證 (Negotiate Authentication) 用於對 LDAP 伺服器的連接。

public:
 LdapConnection(System::DirectoryServices::Protocols::LdapDirectoryIdentifier ^ identifier);
public LdapConnection (System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier);
new System.DirectoryServices.Protocols.LdapConnection : System.DirectoryServices.Protocols.LdapDirectoryIdentifier -> System.DirectoryServices.Protocols.LdapConnection
Public Sub New (identifier As LdapDirectoryIdentifier)

參數

identifier
LdapDirectoryIdentifier

LdapDirectoryIdentifier 物件,指定伺服器。

例外狀況

無法建立連線區塊或開啟與伺服器的連線。

適用於

LdapConnection(String)

來源:
LdapConnection.cs
來源:
LdapConnection.cs
來源:
LdapConnection.cs

LdapConnection(String) 建構函式會使用指定的伺服器,建立 LdapConnection 類別的執行個體。

public:
 LdapConnection(System::String ^ server);
public LdapConnection (string server);
new System.DirectoryServices.Protocols.LdapConnection : string -> System.DirectoryServices.Protocols.LdapConnection
Public Sub New (server As String)

參數

server
String

指定伺服器的字串,可為網域名稱、LDAP 伺服器名稱,或是代表 LDAP 伺服器 IP 位址的小數點分隔字串。 或者,這個參數也可以包含通訊埠編號,並以冒號 (:) 與字串右邊分隔開。

例外狀況

無法建立連線區塊或開啟與伺服器的連線。

適用於

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

來源:
LdapConnection.cs
來源:
LdapConnection.cs
來源:
LdapConnection.cs

LdapConnection(LdapDirectoryIdentifier, NetworkCredential) 建構函式使用指定的目錄識別項和網路認證,建立 LdapConnection 類別的執行個體。 使用交涉驗證。

public:
 LdapConnection(System::DirectoryServices::Protocols::LdapDirectoryIdentifier ^ identifier, System::Net::NetworkCredential ^ credential);
public LdapConnection (System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential);
new System.DirectoryServices.Protocols.LdapConnection : System.DirectoryServices.Protocols.LdapDirectoryIdentifier * System.Net.NetworkCredential -> System.DirectoryServices.Protocols.LdapConnection
Public Sub New (identifier As LdapDirectoryIdentifier, credential As NetworkCredential)

參數

identifier
LdapDirectoryIdentifier

LdapDirectoryIdentifier 物件,指定伺服器。

credential
NetworkCredential

NetworkCredential 物件,指定要使用的認證。

例外狀況

無法建立連線區塊或開啟與伺服器的連線。

適用於

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

來源:
LdapConnection.cs
來源:
LdapConnection.cs
來源:
LdapConnection.cs

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) 建構函式使用指定的目錄識別項、網路認證和驗證類型,建立 LdapConnection 類別的執行個體。

public:
 LdapConnection(System::DirectoryServices::Protocols::LdapDirectoryIdentifier ^ identifier, System::Net::NetworkCredential ^ credential, System::DirectoryServices::Protocols::AuthType authType);
public LdapConnection (System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential, System.DirectoryServices.Protocols.AuthType authType);
new System.DirectoryServices.Protocols.LdapConnection : System.DirectoryServices.Protocols.LdapDirectoryIdentifier * System.Net.NetworkCredential * System.DirectoryServices.Protocols.AuthType -> System.DirectoryServices.Protocols.LdapConnection
Public Sub New (identifier As LdapDirectoryIdentifier, credential As NetworkCredential, authType As AuthType)

參數

identifier
LdapDirectoryIdentifier

LdapDirectoryIdentifier 物件,指定伺服器。

credential
NetworkCredential

NetworkCredential 物件,指定要使用的認證。

authType
AuthType

AuthType 值,指定要使用的驗證類型。

例外狀況

無法建立連線區塊或開啟與伺服器的連線。

authType 超出範圍。

authType 指定為匿名,但 credential 指定認證。

適用於