LdapConnection 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建 LdapConnection 类的实例。
重载
| 名称 | 说明 |
|---|---|
| LdapConnection(LdapDirectoryIdentifier) |
LdapConnection(LdapDirectoryIdentifier) 构造函数使用指定的目录标识符创建 LdapConnection 类的实例。 登录凭据和协商身份验证用于连接到 LDAP 服务器。 |
| LdapConnection(String) |
LdapConnection(String) 构造函数使用指定的服务器创建 LdapConnection 类的实例。 |
| LdapConnection(LdapDirectoryIdentifier, NetworkCredential) |
LdapConnection(LdapDirectoryIdentifier, NetworkCredential) 构造函数使用指定的目录标识符和网络凭据创建 LdapConnection 类的实例。 使用协商身份验证。 |
| LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) |
LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) 构造函数使用指定的目录标识符、网络凭据和身份验证类型创建 LdapConnection 类的实例。 |
LdapConnection(LdapDirectoryIdentifier)
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- 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)
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- 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)
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- 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)
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- LdapConnection.cs
- Source:
- 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 指定为匿名凭据,但 credential 指定凭据。