Creating ASP.NET Environment

Asp.Net Environment Creation


This Blog post is just a quick recap or like a sneak peek for new Developers, who do not know about the Asp.Net Environment creation. There are many many articles available on the internet to learn about this topic, but if you want to learn and get knowledge on this topic quickly, then you might like this post.


Overview : Basically when a User sends a request to the Web Server, the Server which is nothing but the Internet Information Service (IIS) accepts the request and processes that request. After processing the request, the IIS sends a response back to the User in an HTML format. This is just an Overview, so we are not able to understand, what exactly happens at the Server's end, when the User sends a request... So lets take a look at it in detail.


Asp.Net Environment Creation

Asp.Net Environment Creation


          When the User sends a request to the Web Server (IIS), for a particular web page, the IIS accepts that request and first checks the extension of the requested page. Asp.Net executions is ISAPI extension based. Basically "ISAPI Extension" based means, that the IIS has various ISAPI extension which help to execute the request. For example - An aspx page is processed by the aspnet_isapi.dll file. There are various other extensions available in the 


           So when the request goes to the IIS, it first checks what kind of a page request it has got, and based on the page extension, it tells any specific extension to start processing or working on the request.... Now when the processing starts, what happens is... Asp.Net creates a small area or a Unit in the Server's memory which is basically called as the Application Domain!!!


           An Application Domain, basically isolates one application from other. It means when 2 applications are running in the Server's Memory, the App Domain isolates one from the other and both the applications are not able to look into each other's process. And if any of the Application crashes due to some reason, the other Application is not affected by that. You can learn more about the Application Domain here.


          Once the App Domain is created by Asp.Net, now its time where Asp.Net creates an instance of the Hosting Environment. The Hosting Environment instance is an instance which contains all the basic information about the Application like, "Application Folder Name", "Location where the Application is stored" and many other things. You can learn about "Hosting Environment" here.


          Now that the App Domain and the Hosting Environment Instance is created, now its time, where Asp.Net creates the most important Objects... "HttpResponse", "HttpRequest", "HttpContext". I will write another article soon, where I'll be explaining you about each of these Objects in detail. So as of now lets continue with this Article...


         So now that these 3 important Objects have been initialized, Asp.Net creates another Object which is called as the "HttpApplication" Object and starts running the Application. The HttpApplication Object is the most important Object and is responsible for raising various events, which play an important role when the Application runs. If the Project contains a Global.asax page, then during compilation of the project, Asp.net creates an Instance of this page and it is derived from the HttpApplication Class. So the events available in the HttpApplication Object can be called using this "Global.asax" page.


          Thus the Asp.Net Application Environment contains all these Objects and Classes and various events are called while running the application. So this finishes my first article on the Asp.Net Environment Creation... Hope you have liked it.... Please do not forget to give your comments on this. Your comments will encourage me to work more hard and improve myself. Thank you!!!

Ebook Download
View all
Learn
View all