ASP.NET Core的MVC项目自定义身份ApplicationUser

添加了自定义的ApplicationDbContext 和ApplicationUser ,并添加了Identity认证后,会出现

InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' 错误

需要在解决方案中搜索IdentityUser,把相关网页上注入的IdentityUser改为ApplicationUser

原文地址:https://www.cnblogs.com/xuyouyou/p/13457072.html