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
Changing Password
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jun 25, 2009, 3:41 AM EDT
Katte Sang11 reputationPosted Jun 25, 2009, 4:11 AM EDT
entry.Invoke("ChangePassword", new object[] { "admin#123", "admin@123" });
Is this not right?
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jun 25, 2009, 4:26 AM EDT
http://directoryprogramming.net/forums/thread/1692.aspx
Katte Sang11 reputationPosted Jun 25, 2009, 4:54 AM EDT
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();
}