Bar*_*art 4 asp.net thinktecture-ident-server asp.net-identity
我运行了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.
Run Code Online (Sandbox Code Playgroud)
另一个StackOverflow问题的评论中提到了错误,但没有给出解决此问题的方法.
在制定这个问题时,我也找到了解决方案an issue of the IdentityManager GitHub repo
.我不得不改变ApplicationUserManager
in 的构造函数IdentityConfig.cs
:
public ApplicationUserManager(IUserStore<ApplicationUser> store): base(store) {}
Run Code Online (Sandbox Code Playgroud)
至:
public ApplicationUserManager(ApplicationUserStore store): base(store) {}
Run Code Online (Sandbox Code Playgroud)
并且在Create
下面的函数中进行类似的类型更改以获得所有编译.
在ApplicationUserStore
如下加以界定.
public class ApplicationUserStore: UserStore<ApplicationUser>
{
public ApplicationUserStore(ApplicationDbContext ctx): base(ctx) {}
}
Run Code Online (Sandbox Code Playgroud)
我把它放在Startup.cs
声明的上方ApplicationRoleStore
.
归档时间: |
|
查看次数: |
1918 次 |
最近记录: |