Authenticate and bind to a directory server using the Port.DefaultPort.
[Visual Basic] Public Sub Connect( _ ByVal serverName As String, _ ByVal userName As String, _ ByVal password As String, _ ByVal useSSL As Boolean _ ) [C#] public void Connect( string serverName, string userName, string password, bool useSSL ); [C++] public: void Connect( String* serverName, String* userName, String* password, bool useSSL ); [JScript] public function Connect( String serverName, String userName, String password, bool useSSL );
[C#] using System;
using LdapServices.Ldap;
namespace LDAPSampleCodeConsole
{
class SampleApp
{
static void Main(string[] args)
{
Client client = new Client();
client.Connect("directory.yourCompany.ca", "username", "password", true);
// This encrypted connection through Port.DefaultPort is ready for a search.
// Disconnect
client.Disconnect();
}
}
}
Client Class | LdapServices.Ldap Namespace | Client.Connect Overload List