添加了自定義的ApplicationDbContext 和ApplicationUser ,并添加了Identity認證后,會出現
InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' 錯誤
需要在解決方案中搜索IdentityUser,把相關網頁上注入的IdentityUser改為ApplicationUser
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/95.html
標籤:ASP.NET MVC
上一篇:【.NET框架】—— ASP.NET MVC5路由基礎(五)
下一篇:對Asp.net WebApi中異步(async+await)介面實際使用及相關思考(示例給出了get,post,提交檔案,異步介面等實踐).
