HTTP Handlers vs HTTP Modules

Question posted in Computer Software on 11 2009
Rate question difficulty level 0 Votes
What are the differences between  HTTP Handlers and HTTP Modules
and usages ?
 
 
1 Answer
 

HttpHandler help us to inject pre-processing logic based on the extension of the file name requested. So when a page is requested, HttpHandler executes on the base of extension file names and on the base of verbs. For instance, if we have different handlers mapped to file extension. We can also map one handler to multiple file extensions. For instance, when any client requests for file with extension ‘GIF’ and ‘JPEG’, handler3 pre-processing logic executes.

HttpModule is an event based methodology to inject pre-processing logic before any resource is requested. When any client sends a request for a resource, the request pipeline emits a lot of events


Modules are called before and after the handler executes. Modules enable developers to intercept, participate in, or modify each individual request.
Handlers are used to process individual endpoint requests. Handlers enable the ASP.NET Framework to process individual HTTP URLs or groups of URL extensions within an application. Unlike modules, only one handler is used to process a request”.

credits : http://www.codeproject.com/KB/aspnet/HttpModuleandHttpHandle.aspx


11/23/2009
 
 
Add an answer*
 
Email
Location: United States
c# asp.net
Now hiring!
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------