What exactly happens when the Browser request a ASPX page?

What exactly happens when a browser sends a request for an ASPX page to a Server. Following are the steps which occur when we request a ASPX page :-

1. The browser sends the request to the webserver. Let us assume that the webserver at the other end is IIS. 

2. Once IIS receives the request he looks on which engine can serve this request. When I mean engine means the DLL who can parse this page or compile and send a response back to browser. Which request to map to is decided by file extension of the page requested.

Depending on file extension following are some mapping ? .aspx, for ASP.NET Web pages, 

a.  .asmx, for ASP.NET Web services,

b. .config, for ASP.NET configuration files,

c. .ashx, for custom ASP.NET HTTP handlers,

 

d. .rem, for remoting resources 

You can also configure the extension mapping to which engine can route by using the IIS engine.

3. Once IIS passes the request to ASP.NET engine page has to go through two section HTTP module section and HTTP handler section. Both these section have there own work to be done in order that the page is properly compiled and sent to the IIS. HTTP modules inspect the incoming request and depending on that they can change the internal workflow of the request. HTTP handler actually compiles the page and generates output.

4. Depending on the File extension handler decides which Namespace will generate the output. Example all .ASPX extension files will be compiled by System.Web.UI.PageHandlerFactory. 

5. Once the file is compiled it will be send back again to the HTTP modules and from there to IIS and then to the browser.

Bookmark It

Click here if you need a Website


Leave a Reply