ASP.NET Membership change password not working

前端 未结 10 1842
心在旅途
心在旅途 2021-02-19 18:48

I have this code for changing a user\'s password when they click the password reset button (with extra code to log to ELMAH so I can try to figure out what is going wrong).

10条回答
  •  既然无缘
    2021-02-19 19:47

    Edited - following answer is false see comments

    So wait are you trying to locate someone by a Guid? By doing

    Guid userId = new Guid(id);
    

    You are practically creating a guaranteed to be unique ID. So my guess is you are never finding a user and you are resetting a password successfully for nobody. Can you not just find them by the id parameter you pass in?

提交回复
热议问题