HttpApplication object in ASP.Net C#

The HttpApplication object is responsible for selecting the appropriate PageHandlerFactory for that requesting page; this creates an instance of the page class of the web page that has initiated the request. All handler factories implement the IHttphandler interface. How does the HttpApplication object know which is the handler for that page? It first determines the type of the incoming request and invokes the appropriate handler factory.

If the request is for a page, then it calls the PageHandlerFactory for that page.

It finds the handler for the page by searching the <httpHandlers> section of the machine.config file. The HttpModule is one that fits into the HttpPipeLine of objects and can filter or edit the requests or the responses that come its way. On the other hand, the HttpHandler is responsible for initiating rendering and is defined in the configuration files. Your web page class actually derives from the System.Web.UI.Page class and implements the IHttpHandler interface.

Each page handler implements the IHttpHandler interface that contains the ProcessRequest() method, which is actually responsible for processing the request. The response is complete and served to the client browser after the page is unloaded from the memory.
Tags: , , , ,
Hot on Web:


About author