Click to view the chart
XXX
Create an instance of this class (HttpRuntime) for each request. During instantiation, The HttpRuntime class executes many initialization tasks. The first task is to create a package object, to encapsulate all HTTP-specific information about the request. Then, the newly created object (an instance of the HttpContext class) is passed to the pipeline, and each module is used to access the internal working object (exposed through the attributes of HttpContext), such as: Request, response, Session, and Server. after an HttpContext object is created, HttpRuntime obtains an HttpApplication object to start the application and create an HttpApplication instance. All configured modules are created at the same time. For example, if the application is configured like this, ASP. NET will create a SessionStateModule. After all configured modules are created, the Init method of the HttpApplication class is called. (The process of request processing is started by passing the HttpContext object to the ProcessRequest method that implements the IHttpHandler interface). The process is as follows :)
When processing this request, the HttpApplication class will execute the following events. Developers who want to extend the HttpApplication class should pay special attention to these events.
1. Verify the request, check the information sent by the browser, and determine whether it contains potentially malicious tags. If you have configured any URL in the UrlMappingsSection of the Web. config file, perform URL ing.
2. The BeginRequest event is triggered.
3. Trigger the AuthenticateRequest event.
4. Trigger the PostAuthenticateRequest event.
5. Cause the AuthorizeRequest event.
6. Trigger the PostAuthorizeRequest event.
7. Trigger the ResolveRequestCache event.
8. The PostResolveRequestCache event is triggered.
9. Based on the file extension of the requested resource (ing in the application configuration file), select the class that implements IHttpHandler to process the request. If the request is for an object (Page) derived from the Page class and needs to compile the Page, ASP. NET will compile the Page before creating an instance.
10. Trigger the PostMapRequestHandler event.
11. triggered the AcquireRequestState event.
12. Trigger the PostAcquireRequestState event.
13. Trigger the PreRequestHandlerExecute event.
14. Call the appropriate IHttpHandler class ProcessRequest method (or asynchronous BeginProcessRequest) for this request ). For example, if the request is for a page, the current page instance processes the request.
15. The PostRequestHandlerExecute event is thrown.
16. Trigger the ReleaseRequestState event.
17. The PostReleaseRequestState event is triggered.
18. If the Filter attribute is defined, the response is filtered.
19. The UpdateRequestCache event is triggered.
20. Trigger the PostUpdateRequestCache event.
21. An EndRequest event is triggered.
- 2 pages in total:
- Previous Page
- 1
- 2
- Next Page