I installed the server openldap for windowsand I use the LDAPAdmindefault to connect to it:
Server=ldap://localhost:389
Base:dc=maxcrc,dc=com
UserName:cn=Manager,dc=maxcrc,dc=com
Password:secret
Now I want to use PrincipalContextto add users to my ou=People
problem is that I canβt even connect to the server using PrincipalContext. I searched the Net and found many answers on how to connect to the ldap server, but none of them work for me. I get NullReferenceExceptioneither ServerNotFoundExceptionfor different combinations of the provided parameters for the PrincipalContext constructor. I thought I could use PrincipalContext as one of the following:
new PirncipalContext(ContextType.Domain,"maxcrc.com","dc=maxcrc,dc=com")
or
new PrincipalContext(ContextType.ApplicationDirectory,"localhost:389","dc=maxcrc,dc=com")
. , , , .
, , , PrincipalContext openldap?
P.S. Active Directory.