asp.net membership change password without knowing old one

后端 未结 10 2022
日久生厌
日久生厌 2020-12-24 04:48

Evaluting the method signature, it is required to know old password while changing it.

membershipUser.ChangePassword(userWrapper.OldPassword, userWrapper.Pas         


        
10条回答
  •  不思量自难忘°
    2020-12-24 05:27

    Please note, all these mentioned solutions will only work if the RequiresQuestionAndAnswer property is set to false in Membership system configuration. If RequiresQuestionAndAnswer is true then the ResetPassword method needs to be passed the security answer, otherwise it will throw an exception.

    In case you need RequiresQuestionAndAnswer set to true, you can use this workaround

提交回复
热议问题