AllowAnonymous Action Filter

In my last article I have explained how we can set form based authentication using Authorize action filter. In my last article I used Authorize action filter on action which I want to be get executed after authentication.

But it is very difficult to put Authorize attribute on each action. So MVC provide a facility in which we can use Authorize action filter on Controller. In this situation all action will be first authenticated and then get executed.

So if any action which we don’t want to be get authenticated for example home, login, about us etc these are some actions which are accessed without authentication

AllowAnonymous Syntax

So we can use AllowAnonymous action filter in the following manner:-

       public ActionResult Home()
            return View();


So now you are able to access the Home action without any authentication.

Email Address

For any query you can mail me at