.NET LDAP client library for .NET Standard >= 2.0, .NET Core >=1.0, NET5/NET6/NET7/NET8 - works with any LDAP protocol compatible directory server (including Microsoft Active Directory).
Hello, I have a problem with this library. I try to connect login page with ldap port 636. Then, when I test it show the error message 'Error: Connect Error'. I already follow the step from the samples, interactive ssl, securebind and starttls. I don't know why even though I follow steps, but it's doesn't work.
try
{
if (id == String.Empty)
{
IdTxt.Text = "Please insert your id";
}else if (pass == String.Empty)
{
PassTxt.Text = "Password Missing. Please insert you password";
}
else {
LdapConnection conn = new LdapConnection();
conn.SecureSocketLayer = true;
conn.UserDefinedServerCertValidationDelegate += new RemoteCertificateValidationCallback(SSLHandler);
conn.Connect(ldapHost, ldapPort);
conn.StartTls();
conn.Bind(ldapVersion, id, pass);
ErrorLabel.Text = " SSL Bind Successfull";
Response.Redirect("Logout", false);
}
Hello, I have a problem with this library. I try to connect login page with ldap port 636. Then, when I test it show the error message 'Error: Connect Error'. I already follow the step from the samples, interactive ssl, securebind and starttls. I don't know why even though I follow steps, but it's doesn't work.
try
{ if (id == String.Empty) { IdTxt.Text = "Please insert your id"; }else if (pass == String.Empty) { PassTxt.Text = "Password Missing. Please insert you password"; } else { LdapConnection conn = new LdapConnection(); conn.SecureSocketLayer = true; conn.UserDefinedServerCertValidationDelegate += new RemoteCertificateValidationCallback(SSLHandler); conn.Connect(ldapHost, ldapPort); conn.StartTls(); conn.Bind(ldapVersion, id, pass); ErrorLabel.Text = " SSL Bind Successfull"; Response.Redirect("Logout", false); }
} catch(LdapException a) { //Console.WriteLine("Error: " + a.LdapErrorMessage); ErrorLabel.Text ="Error: " + a.Message; }