ldap - OpenDSObject C# equivalent? -
i have old vb script uses opendsobject -
opendsobject("ldap://server:389/dc=com/dc=domain/ou=organizational unit/uid=" & user & "","cn=common name","password",ads_secure_authentication)
i trying convert c#. using directoryentry class.
directoryentry uentry = new directoryentry( "ldap://server:389/dc=com/dc=domain/ou=organizational unit" ); uentry.username = "common name"; uentry.password = "password";
i getting authentication error.
username property need sam name?
can use common name directory entry method?