HttpRuntime class
Page requests are processed first to objects that can handle the original HTTP request, and the markup to be sent to the browser is generated at the end of the pipeline. The HttpRuntime class is the entry point for a modified pipe.
For each request, ASP. NET creates the HttpRuntime object and invokes ProcessRequest to activate the HTTP pipe. The HttpRuntime object initializes the internal objects of many secondary processing page requests at creation time. After the ProcessRequest method is invoked, a HttpContext class instance is created, which encapsulates all HTTP-provided information, which we typically use in code is the HttpContext object, which is created by the HttpRuntime object. The HttpRuntime object uses request information to lock the Web Application object that can handle the request. The Web application can be positioned through the virtual path in the URL, but the object that really locks the Web application that can handle the request is httpapplicationfactory. Returns a valid object that can handle the request. The HttpRuntime object will be a HttpContext object, then pass the HttpContext object to the HttpApplicationFactory object and entrust her with the application that can handle the request. During the lifecycle of an application, the HttpApplicationFactory object maintains a number of HttpApplication objects that are used to process requests. When a program factory object is invoked, it verifies that the requested destination virtual folder exists, and if the application is already running, the factory changes the object from the pool of available objects and then delegates the request object to it, and if not, creates it. If the virtual directory is not invoked, a HttpApplication object is created in the new AppDomain, so that If the application file global.asax exists, the HttpApplication object needs to compile it, which is equivalent to starting the application. The HttpApplication object is used to process page requests, one at a time (multiple objects are used to process concurrent requests).
HttpApplication class
HttpApplication is a base class that represents a running ASP.net application.
It can also be a HttpApplication derived class that represents a running ASP.net application.
If Global.asax exists, the source code for the dynamically generated application class is created.
If Global.asax is available, the application class is created, or the base class HttpApplication is used.
An instance of a HttpApplication class or derived class manages the entire lifecycle of a request, and when a request is processed, the instance is freed before the other request can be processed.
HttpApplication maintains a series of HTTP module objects that can be filtered and modified by the requested content. The registered module may be invoked at any time during the request process. The HttpApplication object can determine what type of request resources (pages, controls, and so on), and then use a handler factory lock to handle the requested handler object. The handler factory object is a class instance that implements the IHttpHandlerFactory interface, and is responsible for locking the object--http handler that can handle the request. A asp.net page is a handler object (an instance of the class that implements the IHttpHandler interface).
Page Factory
The HttpApplication class determines the object model of the request to be processed and delegates the associated handler factory of that type to create its new instance. What happens if the request is a page request?
Once the HttpApplication object is in charge of the request, you must select a suitable handler for the page-oriented request, the factory name is: PageHandlerFactory. To find the appropriate handler, HttpApplication reads the profile <HttpHandlers> section information and contains a major registered handler. When the request comes, the page processing factory creates an object instance of the request page. The Page object inherits from the page class, which implements the IHttpHandler interface, and the Page object is returned to the application factory, which is then passed back to the HttpRuntime object, and the final step is completed by the ASP.net runtime. Asp. NET runtime invokes the ProcessRequest method of the IHttpHandler Page object, which causes the page to execute user-defined code and return HTML markup for the browser.
I found a whole pipeline in the website of the flow chart, more close to: