Last post Sep 14, 2010 04:55 PM by Abdalmohaymen
Sep 09, 2010 08:12 AM|sidharth049|LINK
Can anybody please tell me in very simple language what httphandlers and httpmodules are.
Sep 09, 2010 08:30 AM|CoskunSUNALI|LINK
A Handler is basically a class implementing the IHttpHandler interface and is responsible for processing a request and producing the response. A Handler can request based on the request's file name. For instance xxx.xml file can be processed by your very
own CustomXmlHttpHandler class that you develop. A Handler is located in the end of the ASP.NET pipeline and does not produce events or decide how the lifecycle of a request goes on.
You would usually use a handler to process some certain type of responses. For instance a RSS handler can generate XML content or a Image handler can resize you images on the fly and generate binary content.
On the other hand, a Module (a class that implements IHttpModule interface) can register itself to the ASP.NET pipeline and attach to events that are being triggered during the pipeline (Application Startup, etc).
You would usually use a module to gain control over security, logging, tracing, manipulating some content on the fly (e.g.: Footer text for all pages) and so on.
Sep 14, 2010 04:55 PM|Abdalmohaymen|LINK