ASP.Net Application Life Cycle Overview for IIS7.0

Execute Handler
-> The handler (a module scoped to a URL)  is invoked to construct the response. For aspx files, the PageHandlerFactory  handler is used to respond to the request. For static files, the native-code StaticFileModule module responds to the request.

First request 
-> when unified pipeline receives the first request for any resource in an application, an instance of the ApplicationManager class is created, which is the application domain that the request is processed in.
-> Application domain provides isolation between applications for global variables and enables each application to be loaded separately. In the application domain, and instance of HostingEnvironment class is created, which provides access to information about the application, such as the name of the folder where the application is stored.
-> During first request, top level items in the application are compiled if required, which includes application code in the App_Code folder.

Response objects are created for each request
-> After ApplicationDomain has been created and the HostingEnvironment  object has been instantiated, application objects such as HttpContextHttpRequest and HttpResponse  are created and initialized.

Leave a Reply

Your email address will not be published. Required fields are marked *