ASP.NET Identity Manager错误:尝试创建“MetaController”类型
发布时间:2020-12-16 07:20:24 所属栏目:asp.Net 来源:网络整理
导读:我运行了ThinkTecture的IdentityManager,但现在当转到’/ idm / url时出现错误: An error occurred when trying to create a controller of type 'MetaController'. Make sure that the controller has a parameterless public constructor. 在another Stac
我运行了ThinkTecture的IdentityManager,但现在当转到’/ idm / url时出现错误:
An error occurred when trying to create a controller of type 'MetaController'. Make sure that the controller has a parameterless public constructor. 在another StackOverflow issue的评论中提到了该错误,但未给出该问题的解决方案. 解决方法
在制定这个问题时,我也在
an issue of the IdentityManager GitHub repo 中找到了解决方案.我必须在IdentityConfig.cs中更改ApplicationUserManager的构造函数:
public ApplicationUserManager(IUserStore<ApplicationUser> store): base(store) {} 至: public ApplicationUserManager(ApplicationUserStore store): base(store) {} 并且在下面的Create函数中进行了类似的类型更改,以便进行所有编译. ApplicationUserStore应定义如下. public class ApplicationUserStore: UserStore<ApplicationUser> { public ApplicationUserStore(ApplicationDbContext ctx): base(ctx) {} } 我把它放在ApplicationRoleStore声明之上的Startup.cs中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 为什么验证请求取自ASP.net MVC?
- asp.net-mvc – 在多层应用程序中使用IoC时避免程序集引用
- asp.net-web-api – Restsharp- Method.POST不能正常工作
- asp.net – 一键发布:执行发布时出现异常:已添加具有相同
- ASP.NET版CKEditor与CKFinder的配置使用
- EFCore 5 新特性 SaveChangesInterceptor
- asp.net – MVC 3中的Windows身份验证
- c# HttpClient 发送请求出错时解决办法 c# – 因
- Asp.Net MVC验证 – 依赖字段
- asp.net core3.0 mvc 用 autofac
推荐文章
站长推荐
- ASP.NET MVC中的Dropdownlist onchange事件不使用
- asp.net – 什么叫Page_Load,它是如何做的?
- asp.net – 提供HTTP401 Not Authorized错误的VB
- asp.net-mvc-3 – TextBoxFor vs EditorFor,和ht
- asp.net – 在IIS URL Rewrite 2中重新处理重写的
- asp.net-mvc – ASP.NET MVC如何在生产中禁用调试
- asp.net-mvc – MVC控制器与开箱即用的Sitecore控
- asp.net-mvc – 通过自定义HTML Helper扩展方法渲
- asp.net-mvc – 属性的自定义模型binder
- 如何默认选择一个单选按钮 – asp.net mvc强类型
热点阅读