I\'m trying to add Roles authentication to an Action in a Controller in an ASP.NET MVC application. The code looks something like this:
[Authorize(Roles = \"Some
Add this to your web.config under system.web:
Then you can use:
string[] arr = Roles.GetRolesForUser(User.Identity.Name);
or:
string[] arr = Roles.GetRolesForUser();