語言

LdapConnection 建構函式

定義

建立 LdapConnection 類別的執行個體。

多載

名稱 Description
LdapConnection(LdapDirectoryIdentifier)

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

LdapConnection(String)

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

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

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

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

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

LdapConnection(LdapDirectoryIdentifier)

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

LdapConnection(LdapDirectoryIdentifier)建構子會使用指定的目錄識別碼建立該LdapConnection類別的實例。 登入憑證與協商認證用於連接 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.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.cs

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

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.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 指定憑證。

適用於