Last post Feb 24, 2008 02:46 PM by docluv
Feb 24, 2008 01:58 PM|mohsendeveloper|LINK
what is difference between httpmodule and httphandler?
Feb 24, 2008 02:46 PM|docluv|LINK
A module runs in the background of the Web Site (or can run in the background of the server in IIS 7) and can do many things. Primarily they are used to catch the request by assigning event handlers for difference events in the ASP.NET pipeline. For example
it is really common to write a URL Rewritter as a custom httpModule.
An httpHandler actually processes the request either directly or by being assigned to a file extensioin. ASP.NET .aspx pages, for example, are actually executed through a customized handler. A very common example of using httpHandlers is to stream custom
images on the fly. Many times they will do the resizing at run-time, other times they can be used to protect documents from unauthorized access, etc.
Watch my geekSpeak on the topic to get a visual on how they differ.