Problems with LDAP

0

I am having trouble with LDAP. Now I use this code:

DirectoryEntry ldapConnection = new DirectoryEntry("LDAPS://*******.com:636", "User@bloom.local", "Password");

ldapConnection.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;

DirectorySearcher search = new DirectorySearcher(ldapConnection);

var result = search.Filter = "(objectClass=*)";
search.FindAll();

I spent a large number of experiments, but never received:

Unknown error (0x80005000)

or

The server is not operational.

My property in the softerra LDAP Administrator:

Properties

c#
ldap
directoryentry
asked on Stack Overflow Apr 29, 2016 by LAdmiral • edited Dec 7, 2016 by ROMANIA_engineer

1 Answer

0

The problem is that the simple authentication mechanism requires an LDAP distinguished name (DN) and you provided just a user name. At least, this is what your screenshot shows.

The DN of the administrator is likely something like cn=Administrator,cn=Users,dc=bloom,dc=local.

Also, I would probably steer away from using the administrator credentials in production. It is much more preferable to create an account with the right privileges.

answered on Stack Overflow May 3, 2016 by Bertold Kolics

User contributions licensed under CC BY-SA 3.0