From:http://odetocode.com/blogs/scott/archive/2011/01/17/http-modules-versus-asp-net-mvc-action-filters.aspx
Monday, January 17, 2011
The ASP. NET MVC has the action filters, while the ASP. HTTP modules. Inside their respective processing pipelines, these abstractions serve similar purposes, and I ' ve heard the following ques tion a few times:
When should I write a HTTP module and when should I write an action filter?
If You is creating an MVC application then I'll almost always recommend going with an action filter Instead of an HTTP module. This is my recommendation even if the functionality your is creating is generic enough to work from inside a module (in OT Her words, it doesn ' t depend in MVC specific pipeline stages, like the pre and post processing of action invocation). Filters is closely aligned with the MVC infrastructure and vocabulary, and Filters is the first thing someone would look For if they want to see how you ' ve implemented cross-cutting functionality in MVC.
On the other hand, a HTTP module is something you can reuse in any type of ASP. Witness the flexibility of Elmah-just drop an assembly in the bin directory, tweak a config file, and wait for Elmah to Record errors across an entire application. This configurable flexibility isn ' t something you can does with filters out of the box, but we'll see tomorrow how easy it I s to add.
HTTP Modules versus ASP. NET MVC Action Filters