在新建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]'的更多相关文章

  1. Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'

    An unhandled exception occurred while processing the request. InvalidOperationException: Unable to r ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. Unable to resolve address &#39; &#39; service &#39; &#39;: Name or service not known

    感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免.欢迎指正. 假设转载,请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...

  6. 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 ...

  7. 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 ...

  8. Unable to cast object of type 'System.Int32' to type 'System.String'.

    最近在研究.netcore,尝试把前后端完全分离.但是在写接口的时候,Post参数是FromBody的时候报错了 Microsoft.AspNetCore.Diagnostics.DeveloperE ...

  9. unable to resolve class XXX

    > Task :HelloWorld_Web:compileGroovy startup failed: E:\GradleDemoManyModules\ExampleHelloWorld\H ...

随机推荐

  1. 带着萌新看springboot源码8(spring ioc源码上)

    emmm.....这次先不说springboot原理,先好好回顾一下以前的注解版spring原理,先把spring原理了解清晰了,再看springboot原理更容易. 要说起spring,最重要的就是 ...

  2. Java基础7:关于Java类和包的那些事

    更多内容请关注微信公众号[Java技术江湖] 这是一位阿里 Java 工程师的技术小站,作者黄小斜,专注 Java 相关技术:SSM.SpringBoot.MySQL.分布式.中间件.集群.Linux ...

  3. 漫画:htts是如何保证一台主机把数据安全发给另一台主机

    通过漫画的形式由浅入深带你读懂htts是如何保证一台主机把数据安全发给另一台主机的 对称加密 一禅:在每次发送真实数据之前,服务器先生成一把密钥,然后先把密钥传输给客户端.之后服务器给客户端发送真实数 ...

  4. 理解和使用Promise.all和Promise.race

    一.Pomise.all的使用 Promise.all可以将多个Promise实例包装成一个新的Promise实例.同时,成功和失败的返回值是不同的,成功的时候返回的是一个结果数组,而失败的时候则返回 ...

  5. leetcode — remove-duplicates-from-sorted-array

    import java.util.Arrays; /** * Source : https://oj.leetcode.com/problems/remove-duplicates-from-sort ...

  6. 五一之起一台服务器玩玩-u盘安装centos

    之前淘宝买的300块钱笔记本,就是拿来练手的,但是命令基本都知道了,不来练手,学习下去就没有动力了啊. 对于新的笔记本,我们怎么安装系统呢?能去官网就去官网,你绝对没有体验过睡一晚早上起来服务器就被黑 ...

  7. SpringBoot系列——Spring-Data-JPA

    前言 jpa是ORM映射框架,更多详情,请戳:apring-data-jpa官网:http://spring.io/projects/spring-data-jpa,以及一篇优秀的博客:https:/ ...

  8. 第41章 CORS - Identity Server 4 中文文档(v1.0.0)

    第41章 CORS IdentityServer中的许多端点将通过基于JavaScript的客户端的Ajax调用进行访问.鉴于IdentityServer最有可能托管在与这些客户端不同的源上,这意味着 ...

  9. 【Linux】Linux上安装Nginx

    本文介绍Linux环境安装Nginx,这里用的Linux系统是CentOS 7.2. 1. 从Nginx官网下载Nginx.这里用的版本为:1.13.6. 2. 将下载下来的Nginx上传到Linux ...

  10. ajax点击加载更多数据图片(预加载)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...