InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]'
在新建asp.net core 应用后, 添加了自定义的ApplicationDbContext 和ApplicationUser ,并添加了Identity认证后, 会出现 InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' 错误。需要把相关网页上注入的UserManager<IdentityUser> 改为UserManager<ApplicationUser> .
InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]'的更多相关文章
- Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'
An unhandled exception occurred while processing the request. InvalidOperationException: Unable to r ...
- Unable to resolve service for type 'Microsoft.AspNetCore.ResponseCompression.IResponseCompressionProvider' while attempting to activate 'Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMid
System.InvalidOperationException HResult=0x80131509 Message=Unable to resolve service for type 'Micr ...
- Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'xxxxx.Controllers.xxxxController'.
Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activa ...
- Core 3.1 MVC 抛异常“InvalidOperationException: No service for type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' has been registered.”
.NET Core 的版本是 3.1遇到的问题是 Action 中 return View() 的时候报错 An unhandled exception occurred while processi ...
- Unable to resolve address ' ' service ' ': Name or service not known
感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免.欢迎指正. 假设转载,请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...
- can't run roscore 并且 sudo 指令返回 unable to resolve host
I'm using ubuntu14 LTS. Problems: 1. When run roscore, got a mistake and an advice to ping the local ...
- Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.cache.ehcache.EhCacheRegionFactory] as strategy [org.hibernate.cache.spi.RegionFac
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springfram ...
- Unable to cast object of type 'System.Int32' to type 'System.String'.
最近在研究.netcore,尝试把前后端完全分离.但是在写接口的时候,Post参数是FromBody的时候报错了 Microsoft.AspNetCore.Diagnostics.DeveloperE ...
- unable to resolve class XXX
> Task :HelloWorld_Web:compileGroovy startup failed: E:\GradleDemoManyModules\ExampleHelloWorld\H ...
随机推荐
- 基于三层架构的增删改查Get知识点
给DataGridView控件绑定datatable数据源之后总是会多一行,在属性里修改属性allowuserToaddrow值为false即可 不可编辑状态是设置成只读状态即可,英文属性readon ...
- 带着新人学springboot的应用06(springboot+RabbitMQ 中)
上一节说了这么多废话,看也看烦了,现在我们就来用鼠标点点点,来简单玩一下这个RabbitMQ. 注意:这一节还是不用敲什么代码,因为上一节我们设置了那个可视化工具,我们先用用可视化工具熟悉一下流程. ...
- Connection open error . Connection Timeout Expired. The timeout period elapsed during the post-login phase.
是这样的,最近我在开发Api(重构),用的数据库是Sqlserver,使用的Orm是 SqlSugar(别问我为什么选这个,boss选的同时我也想支持国人写的东西,且文档也很全). 被催的是,写好了程 ...
- Vim编辑器显示行数
很多时候,我们编写代码的时候,编译器报错,在某一行,这时我们虽然可以:行数来跳转,但是没有直观的行数,总是感觉不妥,vi和vim默认是没有行号的,那么怎么办呢?下面我就教你怎么设置行号. 工具: 一台 ...
- mysqladmin实用工具
mysqladmin命令行实用工具是命令行工具套件中的重量级工具.这个工具可以执行很多选项和工具(被称为命令). 因为这个实用工具是从命令行启动运行的,它使得管理员可以编写一系列操作脚本,这比直接运行 ...
- Linux 项目上线管理 MAVEN + expect 一台机器管理所有机器的应用程序
一.目的 在一台服务器上面管理所有机器的应用程序. 设想是通过一条命令能够知道所有应用程序是否running 如果not running 查看具体项目的log 跟踪具体原因,程序问题汇报相关负责人 二 ...
- MyBatis之分页插件(PageHelper)工作原理
数据分页功能是我们软件系统中必备的功能,在持久层使用mybatis的情况下,pageHelper来实现后台分页则是我们常用的一个选择,所以本文专门类介绍下. PageHelper原理 相关依赖 & ...
- 在win10系统开启linux子系统
1. 2.重启计算机 3.在winstore下载和安装 ubuntu 4.查看当前win10子系统的linux版本 lsb_release -a 5.设置root账号密码, 在终端输入命令 sudo ...
- Android开发——使用intent传递对象
intent传递对象有两种方法: 方式一:Serializable 方式 方式二:Parcelable方式 在这里不多介绍了,这一篇就是快速上手使用教程,至于详细原理介绍的,请看这一篇http://w ...
- 开源IM项目-InChat登录接口设计与实现(基于Netty)