In the last MVC post we looked at Filter Providers but didn’t
really describe what filters were. Filters are special classes
which can execute some functionality at certain points during
each MVC request. Historically most filters have been attributes
that you can apply to an action method or a controller class
(not all as Controllers can also act as filters). Before talking
about filters it’s worth looking at how a request in MVC is
handled. At the lowest level, all web applications behave the
same way: - A browser (or some other client) issues an HTTP
request to your application - Your application performs some
processing based on the incoming request - The application sends
an HTTP response back to the client (this can be HTML, XML, JSon
or even just a simple status code) In an ASP.NET MVC application
the incoming request is mapped to a method (called an Action) on
a class (called the Controller). Once the controller has been
created and the correct action method selected it is the job of
the Action Invoke