asp.net-core-1.0 – Asp.Net Core 1.0 RTM中CreateIdentityAsyn
发布时间:2020-12-16 03:46:01 所属栏目:asp.Net 来源:网络整理
导读:在ASP.Net Core1.0 RTM中,我正在尝试使用此方法创建Identity: userManager.CreateIdentityAsync() 但我得到这个错误: ‘UserManager’ doesnot contain a definition for ‘CreateIdentityAsync’. 出了什么问题? 解决方法 你可以尝试 IUserClaimsPrincip
在ASP.Net Core1.0 RTM中,我正在尝试使用此方法创建Identity:
userManager.CreateIdentityAsync() 但我得到这个错误:
出了什么问题? 解决方法
你可以尝试
IUserClaimsPrincipalFactory
ClaimsPrincipal claimsPrincipal = await _claimsPrincipalFactory.CreateAsync(user); ((ClaimsIdentity) claimsPrincipal.Identity).AddClaim(new Claim("user_id",user.Id.ToString())); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-core – ASP.NET 5中RegisterObject / QueueBackgr
- asp.net创建helloWord
- ASP.Net的Web TWAIN扫描解决方案?
- asp.net – 在proc中使用sp_executesql时出现“select perm
- asp.net-mvc – MVC – 索引视图溢出
- 在ASP.NET MVC中使用MySQL的AccountController
- asp.net-mvc – 发布重定向到ASP.NET MVC和验证与Restful U
- asp.net-mvc – 使用List的奇怪剃刀行为
- 将ASP.Net网站从SVN部署到多个服务器?
- asp.net-mvc – T4MVC和不同区域的重复控制器名称
推荐文章
站长推荐
热点阅读