I am authenticating user in following way but it says "unknown username or password" even though I provide correct username and password. I am authenticating against Sunone
directory server. Unfortunately as per rquirement I could not bind any user with the direcory except service username and password.
I could not figure out whether this correct way or not. Any help would be appreciated.
DirectoryEntry entry = new DirectoryEntry("LDAP URL");
entry.AuthenticationType = AuthenticationTypes.ServerBind;
entry.Username = "uid=thost,ou=somthing,dc=something,dc=something";
entry.Password = password;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(uid=" + actualUid + ")";
SearchResult rc = search.FindOne();
DirectoryEntry de = rc.GetDirectoryEntry();
de.Password = actualPassword;
object o = de.NativeObject;
catch (Exception ex)
View Complete Post