Application Life Cycle Events in ASP.Net

The Application Life Cycle Events

1. Whenever you press the Submit button on the web page, the request is sent to the web browser; in our case, let the web server be IIS.

2. The IIS picks up this request and looks for the server extensions. Each server extension is actually mapped to the IIS. Now, if the server extension of this request is .aspx, it maps to aspnet_isapi.dll. After this .dll is invoked, it hosts the ASP.NET worker process that initializes the Http Pipeline.

3. If the HttpApplication object does not exist for the application, it creates one—or else it picks it from the pool of these HttpApplication objects and passes the incoming request to it to handle.

4. The worker process calls the HttpRuntime.ProcessRequest() method.

5. The HttpRuntime creates the HttpContext and calls the HttpApplicationFactory.

6. The HttpApplicationFactory creates an instance of the web page object from a dynamically created assembly and selects the appropriate HttpApplication object that can serve the incoming request.

7. The HttpApplication instance processes the request and, in turn, selects the appropriate PageHandlerFactory.

8. The PageHandlerFactory now creates the page instance by making use of the page handler of the web page. It does this to return the page instance to the HttpRuntime through the HttpApplicationFactory.

9. The HttpRuntime uses this page instance and calls the ProcessRequest() method of the web page.

10. The ProcessRequest() method first calls the FrameworkInitialize() method and then calls the page life cycle methods.
Tags: , , , , , ,
Hot on Web:


About author