using Novell.Directory.Ldap•;
public static void Main()
string domainName = "ldap.forumsys.com";
string username = "read-only-admin";
string password = "password";
Console.WriteLine(ValidateUser(domainName, username, password));
public static bool ValidateUser(string domainName, string username, string password)
string userDn = "cn=read-only-admin,dc=example,dc=com";
using (var connection = new LdapConnection {SecureSocketLayer = false})
connection.Connect(domainName, LdapConnection.DefaultPort);
connection.Bind(userDn, password);
Console.WriteLine(connection.Connected);
Console.WriteLine(ex.ToString());