Home All Groups Group Topic Archive Search About

Trying to use an Ldap-Connection (VS2005, C#, .Net 2.0)

Author
26 Sep 2006 12:08 PM
Harald
Hi,
I try to read some data from a server using LDAP with the
System.DirectoryServices.Protocols types. I startet with:

....
string server = "servername.intern.MyCompany.de:52000";

LdapDirectoryIdentifier ldapDir = new LdapDirectoryIdentifier(server, false,
false);
LdapConnection ldapConn = new LdapConnection(ldapDir);
ldapConn.AuthType = AuthType.Basic;
ldapConn.Credential = new NetworkCredential(LDAP_APP_USER,
LDAP_APP_USER_PSWRD);
ldapConn.SessionOptions.SecureSocketLayer = false;
ldapConn.Timeout = new TimeSpan(0, 0, 30);
ldapConn.Bind();

The Bind() call throws an exception stating that the server is not
available. But with JXplorer or other tools the connection can be
established. So what is wrong?
BTW, the documentation about the Protocols types is really rather thin and
there are no examples available. Can someone give me a hint where to find
better docu and samples? Or a book recommandation?
Thanks in advance!

Best regards, Harald

Author
29 Sep 2006 12:32 PM
Harald
Problem solved, seems to be caused by an expired SSL-certificate.
- Harald

AddThis Social Bookmark Button