I've inherited a WebSite which, is using ASP.NET Identity version 1.0 for user managment, and have a situation, where we quickly need to roll out some functionality to allow a user to reset their password. We fully, intend to migrate this site onto the latest and greatest, the MS have to offer, but for the time being, we just need this to work.
I'v therefore, decompiled the Identity dll, and have tried calling it as follows:
protected async void ForgotPassword(object sender, EventArgs e)
string password = Membership.GeneratePassword(12, 1);
var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));
ApplicationUser user = manager.FindById(User.Identity.GetUserId());
await manager.AddPasswordAsync(User.Identity.GetUserId(), password);
//Send out email.
GlobalMethods.SendPasswordChangeNotification(user.UserName, user.Email, password);
I get me email, with the random password, but the physicall PasswordHash and SecurityStamp in the underlining table (AspNetUser), isn't updated at all.
Can you please assist?