How to assign Roles to Authorize in MVC 4

18 Mar 2014, 01:11 PM

You can assign the role to the Authorize attribute by assigning role name to the Roles. See the example below.

 [Authorize(Roles = "Administrator")]
 public class AcoAdminController : Controller
 {

 }

Related Contents

15 May 2014, 08:07 AM
C#, LINQ, List
15 May 2014, 07:54 AM
C#, LINQ, List
29 Apr 2014, 03:07 AM
C#, Generic
About
Assign role to the authorize attribute of controlle in MVC

Date Posted 18 Mar 2014, 01:07 PM
Author Brainy Solutions
Views 899
;