LDAP Client.Net

Client.Connect Method (String)

Authenticate and bind to a directory server on the Port.DefaultPort using unencrypted transport, and the empty string as both username and password.

[Visual Basic]
Public Sub Connect( _ 
   ByVal serverName As String _ 
)
[C#]
public void Connect(
   string serverName
);
[C++]
public: void Connect(
   String* serverName
);
[JScript]
public function Connect(
   String serverName
);

Parameters

serverName
Name of the server.

Example

[C#]
using System;
using LdapServices.Ldap;

namespace LDAPSampleCodeConsole
{
class SampleApp
{
static void Main(string[] args)
{
Client client = new Client();
client.Connect("directory.yourCompany.ca");
// This unencrypted connection through Port.DefaultPort is ready for a search

// Disconnect
client.Disconnect();
}
}
}

See Also

Client Class | LdapServices.Ldap Namespace | Client.Connect Overload List