Changing Password in Active Directory
I am using Active directory for Authentication from my aspx page. I provided the option for changing the password.
I couldable to change the Password in Active Directory.
The problem when login it is taking both old password and new password. If i rebuild the project then it is taking only new password. How Can i rectify this.
Please help me
The Code is given Below
Dim deSearch As DirectorySearcher = New DirectorySearcher
deSearch.SearchRoot = de
deSearch.Filter = "(&(objectClass=user) (sAMAccountName=" + Trim(txtlogin.Text) + "))"
Dim result As SearchResult = deSearch.FindOne()
result.GetDirectoryEntry.Invoke("ChangePassword", New Object() {Trim(txtpwd.Text), newPassword})
de_user.CommitChanges()
result.GetDirectoryEntry.CommitChanges()
de_user.RefreshCache()
|