I have a webforms application which was built with ASP.NET Membership. I migrated to Identities successfully.
I now want to use Claims authorization instead of Roles authorization, but the Role information for the old users has been migrated to the AspNetUserRoles table in the database but the AspNetUserClaims table is empty. New users registered after migration, I can add to AspNetUserClaims with the following code:
IdentityResult result1 = manager.AddClaim(user.Id, new Claim(ClaimTypes.Role, "role"));
But the old users are only registered in the AspNetUserRoles table not in the AspNetUserClaims table.
On login will the claim created include Role information from the
AspNetUserRolestable also or only from theAspNetUserClaimstable?Will the
User.IsInRole()check both theAspNetUserRolestable and theAspNetUserClaimstable?How can I migrate information from the
AspNetUserRolestable to theAspNetUserClaimstable?