boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Identity authorization for a particular view/page in ASP.NET MVC

Updated on     Kisan Patel

To perform Identity Authorization we need to add identity authentication in our project.

Now you can add authentication for whole controller and on particular method. we can authorize users based on username and password and Role defined in database.

If authorize attribute is applied for method then this method will not be available to the anonymous user.

[Authorize] // authentication for all users any user can use this action method
public ActionResult Index()
{
     return View();
}

[Authorize(Role="Admin")] // Only Admin can use this action method no other role can user this action method
public ActionResult Index()
{
     return View();
}

[Authorize(Role="Admin,Client")] // we can all roles by separating coma
public ActionResult Index()
{
     return View();
}

ASP.NET MVC

Leave a Reply