简体   繁体   中英

Forgot Password in Asp.Net mvc5 Identity version 1.0.0

I have been trying to implement 'Forgot Password' functionality in my mvc5 web application. There are new updates in Identity.EntityFramework 2.2.1 package, but its difficult to migrate to the new version. So i have to do the work implicitly.

I am following this tutorial Forgot Password in MVC5

Can't figure out what the author is trying to do in ResetPassword ActionMethod.. Got Error in this line: AspNetUser user = _repoAspDotNetUser.GetAspNetUser(email); Help would be highly Appreciated..

Given your answers in the comments on your question, you should be able to replace the line causing an error with something like the following:

ApplicationUser user = _userManager.FindByEmail(email);

You can use var instead of ApplicationUser if you prefer. I've made an assumption that your instance of UserManager is called _userManager , but I'm sure you can figure it out from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM