Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Reset Password without taking old password as parameter in Asp.Net Identity

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 5.20k
    Comment on it

    Reset password is a part of forgot password functionality in ASP.Net identity. When a user forgets his/her password and want to change his password without using old password, then we use reset password functionality.

    In Asp.Net identity, we have methods to remove user`s old password and add users new desired password. Here is the sample code for the same

    UserManager.RemovePassword(user.Id);
    UserManager.AddPassword(user.Id, newPassword);

    Here we first use Remove password to remove the user`s password and then we call AddPassword to add the new password for the user. Both these methods as contained in UserManager object of ApplicationUserManager class. ApplicationUserManager class contains all the necessary methods related to user account

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: