The co-relation between HTTP handler and HTTP module is both are an integral part of the ASP.NET application. For each request is being send by the user for processing, the request will process by multiple HTTP modules and after that the request is processed by a single HTTP handler. When a request is processed by HTTP handler, then the request goes back to the user through HTTP modules.
The handlers are used to process individual endpoint requests made by the user. It returns a response to a request that is identified by a file name extension. It also enables ASP.NET application to process the HTTP URL extensions and is implementing the IHttpHandler interface, which is located in the System.Web namespace. These are analogous to Internet Server Application Programming Interface (ISAPI) extensions.
The modules are used to invoke all requests and responses made by the user. It is executed before and after the handler executes. It also enables user to modify each individual request. These modules implementing IHttpModule interface, which is located in the System.Web namespace.
Asked In: Many Interviews |