ASP.NET MVC – Make all Action Methods Secure in Controller

Updated on     Kisan Patel

To make all action methods public in secure controller, we just add [Authorize] before the controller starts.

[Authorize]
public class HomeController : Controller
{
     public ActionResult Index()
     {
         return View();
     }
}

ASP.NET MVC

Leave a Reply