An HTTP module is an assembly that is called on every request made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life cycle events throughout the request.
An ASP.NET HTTP handler is the process (frequently referred to as the “endpoint”) that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.
Comparison between HttpModules and HttpHandlers in ASP.NET
|Many HttpModules can service one request||Only one HttpHandler can service a request|
|Modify and support request through services||Generate the response that is sent back to the browser|
|Implemented through the IHttpHandler interface||Implemented through the IHttpHandler interface|
|Registered through code or the web.config file||Registered through code or the web.config file|
|Designed to integrate with any of the Life Cycle Events||Generally only concerned with the events related to handler mapping and execution|