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

H

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top