两种身份认证方式
当前用户:HttpContext.User.Identity.Name
//原membership判断所属脚色
if (Roles.IsUserInRole("Administrators"))
//现identity判断
var manager = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
if (manager.IsInRole(HttpContext.User.Identity.GetUserId(),"Administrators")) //新判断role
不同身份认证需要在sqlserver中创建不同的用户表
标签:判断,角色,用户,Administrators,manager,User,HttpContext,所属,aspnet From: https://www.cnblogs.com/Biyuanguang/p/17018663.html