
AD Change User Password: Access Denied
Greetings,
I have an ASPX UI that calls a web service to change the users password in
Active Directory.
I am getting an Logon Failure Access Denied, with the user who has logged on
to the account correctly with the correct username and password.
I have even tried WindowsImpersonationContext.
This is the method that is called from the [WebMethod]... any ideas or
suggestion would be great.
Micah
public void ChangePassword( string OldPassword, string NewPassword )
{
try
{
DirectoryEntry de = new DirectoryEntry( this.Path,
this.Properties["samaccountname"].Value.ToString(), OldPassword,
AuthenticationTypes.Secure );
object[] tt = new object[]{ OldPassword, NewPassword };
de.Invoke( "ChangePassword" ,tt ); $$$ Fails here $$$
de.CommitChanges();
de.Close();
Quote:
}
catch( Exception exc )
{
throw exc;
Quote:
}
}