1.8.3.Restricting Access

  • 1.Modify FilterConfig.cs to restrict all user to visit

             filters.Add(new AuthorizeAttribute());
  • 2.Modify HomeController.cs to allow anonymous user to visit homepage

       [AllowAnonymous]
          public ActionResult Index()
          {
              return View();
          }

Last updated