In the Http Pipeline, you have a set of objects, such as HttpRuntime, HttpWorkerRequest, HttpApplicationFactory, and so on.
The HttpApplicationFactory is simply a factory that creates HttpApplication objects. It is a pool that contains these HttpApplication objects so that the request can be served.
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
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.