New
- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Authentication Filters:
Authentication filter runs before any other filter or action method. Authentication confirms that you are a valid or invalid user.
Authorization Filters:
Authorization Filters are responsible for checking User Access. These filters used to implement authentication and authorization for controller actions.
Action Filters :
Action Filter is an attribute that you can apply to a controller action or an entire controller.
This filter will be called before and after the action starts executing and
after the action has executed.
Result Filters:
The Output Cache Attribute class is an example of Result Filters. These implement the IResult Filter interface which like the IAction Filter has OnResult Executing and OnResult Executed.
These filters contain logic that is executed before and after a view result is executed.
Like if you want to modify a view result right before the view is rendered to the browser.
Exception Filters :
The HandleErrorAttribute class is an example of Exception Filters.
These implement the IExceptionFilter interface and they execute if there are any unhandled exceptions thrown during the execution pipeline.
These filters can be used as an exception filter to handle errors raised by either your controller actions or controller action results.
Comments
Post a Comment