When I try to change the password using the invoke method, I am getting the following exception
"Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))"
Kindly tell me a solution
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Katte SangPosted Jun 25, 2009, 8:54 AM
DirectoryEntry entry = new DirectoryEntry("LDAP://Server", domainAndUsername, "Password", AuthenticationTypes.Secure);
DirectorySearcher mySearcher = new DirectorySearcher(entry);
SearchResult searchResult = mySearcher.FindOne();
if (searchResult != null)
{
entry.Invoke("ChangePassword", new object[] { "Password", "NewPassword" });
entry.CommitChanges();
}
Niradhip ChakrabortyPosted Jun 25, 2009, 8:26 AM
http://directoryprogramming.net/forums/thread/1692.aspx
Katte SangPosted Jun 25, 2009, 8:11 AM
entry.Invoke("ChangePassword", new object[] { "admin#123", "admin@123" });
Is this not right?
Niradhip ChakrabortyPosted Jun 25, 2009, 7:41 AM