Sunday, 1 February 2015

ASP.NET Application Life Cycle


ASP.NET Application Life Cycle



Step 1 : End User sends request to the IIS.IIS checks which ISAPI extension can serve this request.It checks the extension and according to extension the request is processed.For example if it is a '.ASPX' extension then it will serve by 'aspnet_isapi.dll' for processing.

Step 2 : If it is a first request then a  'ApplicationManager' class creates an application domain where the website will run.

Step 3 : App domain creates the hosting environment i.e. the 'httpRuntime'.If there is any issue in one application domain it does not affect the other application's domain because it creates isolation between two applications on IIS.

Step 4 :When the hosting environment i.e. the 'HttpRuntime' is created then all the necessary core ASP.NET objects like ‘HttpContext’ , ‘HttpRequest’ and ‘HttpResponse’ objects are created. 

Step 5 : It again check if it is a first request then it creates the ‘HttpApplication’ object to serve the request.If we have used the global.asax file in our application then creates the object of global.asax file instead of ‘HttpApplication’ object.NOTE :global.asax file also inherited from the ‘HttpApplication’ class.

Step 6 :  It assigns the ‘HttpApplication’ object to the core ASP.NET objects to process the page.





No comments:

Post a Comment