What are Filters in ASP.NET MVC?

Updated Apr 28, 2026

Short answer

Filters allow executing logic before or after controller actions.

Deep explanation

Filters are used for cross-cutting concerns like logging, authentication, and error handling. Types include Authorization, Action, Result, and Exception filters.

Real-world example

Logging user requests or checking permissions.

Common mistakes

  • Using filters for business logic.

Follow-up questions

  • What is Authorization filter?
  • Why filters?

More ASP.NET MVC interview questions

View all →