Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I assign user roles on mvc5 usinng asp.net Identity.
Posted
Comments
Nathan Minier 31-Jul-14 8:30am    
If you're using AD/LDAP (Windows Authentication), you can use the IPrincipal.IsInRole("role") method to determine group membership and use your groups for RBC.

If you're using a username/password model, you'll need to build your own role provider. There's a tutorial at http://www.codeproject.com/Articles/607392/Custom-Role-Providers which may target MVC3, but will still work fine for 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900