Modifier

Partager via


LdapConnection Constructors

Definition

Creates an instance of the LdapConnection class.

Overloads

LdapConnection(LdapDirectoryIdentifier)

The LdapConnection(LdapDirectoryIdentifier) constructor creates an instance of the LdapConnection class using the specified directory identifier. The logon credentials and the Negotiate Authentication are used to connect to the LDAP server.

LdapConnection(String)

The LdapConnection(String) constructor creates an instance of the LdapConnection class using the specified server.

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

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)

The LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) constructor creates an instance of the LdapConnection class using the specified directory identifier, network credentials, and authentication type.

LdapConnection(LdapDirectoryIdentifier)

Source:
LdapConnection.cs
Source:
LdapConnection.cs
Source:
LdapConnection.cs

The LdapConnection(LdapDirectoryIdentifier) constructor creates an instance of the LdapConnection class using the specified directory identifier. The logon credentials and the Negotiate Authentication are used to connect to the LDAP server.

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)

Parameters

identifier
LdapDirectoryIdentifier

An LdapDirectoryIdentifier object that specifies the server.

Exceptions

Failed to create a connection block or to open a connection to server.

Applies to

LdapConnection(String)

Source:
LdapConnection.cs
Source:
LdapConnection.cs
Source:
LdapConnection.cs

The LdapConnection(String) constructor creates an instance of the LdapConnection class using the specified server.

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)

Parameters

server
String

A string specifying the server which can be a domain name, LDAP server name or dotted strings representing the IP address of the LDAP server. Optionally, this parameter may also include a port number, separated from the right end of the string by a colon (:).

Exceptions

Failed to create a connection block or to open a connection to server.

Applies to

LdapConnection(LdapDirectoryIdentifier, NetworkCredential)

Source:
LdapConnection.cs
Source:
LdapConnection.cs
Source:
LdapConnection.cs

The LdapConnection(LdapDirectoryIdentifier, NetworkCredential) constructor creates an instance of the LdapConnection class using the specified directory identifier and network credentials. Negotiate Authentication is used.

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)

Parameters

identifier
LdapDirectoryIdentifier

An LdapDirectoryIdentifier object that specifies the server.

credential
NetworkCredential

A NetworkCredential object that specifies the credentials to use.

Exceptions

Failed to create a connection block or to open a connection to server.

Applies to

LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType)

Source:
LdapConnection.cs
Source:
LdapConnection.cs
Source:
LdapConnection.cs

The LdapConnection(LdapDirectoryIdentifier, NetworkCredential, AuthType) constructor creates an instance of the LdapConnection class using the specified directory identifier, network credentials, and authentication type.

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)

Parameters

identifier
LdapDirectoryIdentifier

An LdapDirectoryIdentifier object that specifies the server.

credential
NetworkCredential

A NetworkCredential object that specifies the credentials to use.

authType
AuthType

A AuthType values that specifies the type of authentication to use.

Exceptions

Failed to create a connection block or to open a connection to server.

authType is out of range.

authType is specified as Anonymous but credential specified credentials.

Applies to