ASP.NET MVC – Make Action Method as Anonymous Methods in Secure Controller

Updated on     Kisan Patel

To make an action method as a anonymous methods in secure controller, we can make that method as Anonymous method by putting [AllowAnonymus] before the method.

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

ASP.NET MVC

Leave a Reply