Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

Nimai Mondal
More...


Resources » .NET programming » ASP.NET/Web Applications

ASP.NET: Request Architecture (Internal)


Posted Date:     Category: ASP.NET/Web Applications    
Author: Member Level: Gold    Points: 20


This article gives insight on how ASP.Net request is processed once it's been issued from the browser. It also provide some basic information about the components involved in this whole request processing architecture.



 


ASP.NET: Request Architecture (Internal)




Step1: A request is issued from the browser


For ex: user types www.google.com in address bar, after this request reaches to the server in which this site is hosted.

User types URL in address bar ------> request is issued to browser


Step2: Kernel mode http.sys picks up the request


Once the request reached IIS, it is picked up by the kernel mode http.sys driver.

Q:kernel mode http.sys driver?
When IIS creates any site, it gets registerd with kernel mode http.sys driver, which then receives all the request for this site.

Request from browser -------> http.sys picks up the request


Step3: Request is forwarded to the application pool


kernel mode process (http.sys) ------> redirects request to user mode process(w3wp.exe worker process)

Note: Each webapplication runs unders a application pool which inturn is managed by an instance of worker process.


Step4: Worker process loads the ASP.NET ISAPI extension


ISAPI extensions are the IIS way to handle the request for different resources. Worker process looks into the requested URL to load the correct ISAPI extension. ASP.NET installs its own ISAPI extension (aspnet_isapi.dll) and adds the mapping in IIS. Since .aspx extension is mapped to aspnet_isapi.dll extesnion, worker process passes the request to aspnet_isapi extension.

aspnet_isapi extension -------> loads the http runtime to start the request processing

The request has passed from the browser to http.sys, which in turn passed the request to the application pool. The worker process which is running the application pool investigates the URL of the request, and uses the IIS application extension mapping to load up the ASP.NET ISAPI "aspnet_isapi.dll". The ASP.NET ISAPI will now load the HTTP Runtime, which is also called the ASP.NET Runtime. The HTTP Runtime creates an HttpContext and associates the request with an HttpApplication. The request passes through the HTTP Pipeline
HTTP Modules are executed against the request until the request hits the ASP.NET page HTTP Handler. Once the request leaves the HTTP Pipeline, the Page life cycle starts.


Step5: Inside HTTP runtime


* Loads the HttpRuntime class
* HttpRuntime.ProcessRequest method signals the start of the processing
* A new instance of HttpContext in created for the request. HttpContext represents the context of the currently active request. HttpContext is accessible throughout the lifespan of the request and can be accessed using HttpContext.Current property.





Did you like this resource? Share it with your friends and show your love!


Responses to "ASP.NET: Request Architecture (Internal)"
Guest Author: Siby     13 Oct 2012
Nice article


Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Employee System Application using ASP.net MVC
    Previous Resource: Web application security for ASP .NET
    Return to Resources
    Post New Resource
    Category: ASP.NET/Web Applications


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    (No tags found.)



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.