Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
WebSecurity.ChangePassword() method is returning false (i.e failing to change). I have provided the correct paramaters (username, newPassword, confirmPassword).

The method fails (returns false).

After checking the Membership Database, the account i'm trying to change the password of, the 'PasswordFailuresSinceLastSuccess' column increments by 1 on every attempt. This seems very odd

Has anyone ever experienced this problem before?

Many Thanks in advance.

What I have tried:

Checked all parameters aren't null
Checked user is not locked out
Posted
Updated 24-May-16 3:24am

1 solution

Quote:
I have provided the correct paramaters (username, newPassword, confirmPassword).

According to the documentation[^], the parameters are: username, currentPassword, newPassword.

You need to pass the user's current password as the second parameter. You are currently passing the user's new password as the second parameter. Since the new password doesn't match the current password, the attempt to change the password fails.
 
Share this answer
 
Comments
Grant Weatherston 24-May-16 9:31am    
yes i just read that , i was looking at it wrong. My baad

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900