If I call user.ChangePassword(oldpass,newpass), and the old password is wrong, or the new password does not meet the provider’s complexity requirement , the method fails without warning. is there any way i can find out if there is an error and what the error was.
I can always put these checks in my code, but there should be a way to do it using the Membership APIs
Unfortunately not. The
ChangePasswordmethod only returns a simple bool for success/fail.Your best option on fail would be to display a generic message to the user stating all possible failure reasons… e.g.
Failed to Change Password.
This may have occured because:
If you want to give more specific information, then as you said, you would need to implement a rules checker in your own code and relay information to the user based on that check.