Read full article on Falafel blog here
ASP.NET MVC 5 provides five different kinds of Filters. They are as follows:
- Authentication [Introduced in MVC5]
- Authorization
- Action
- Result
- Exception
Filters are used to inject logic at the different levels of request processing. Let us understand where at the various stages of request processing different filters get applied.
- Authentication filter runs before any other filter or action method
- Authorization filter runs after Authentication filter and before any other filter or action method
- Action filter runs before and after any action method
- Result filter runs before and after execution of any action result
- Exception filter runs only if action methods, filters or action results throw an exception
Leave a Reply