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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM