C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Hows Requests handle in Asp.net


Posted Date: 17 Jul 2008    Resource Type: Articles    Category: .NET Framework

Posted By: Ashish Shah       Member Level: Gold
Rating:     Points: 10



Hello friends,

Here is some explanation for hows the request from browser to web server is handled by Asp,Net..

Very first and in basic Browser sends the request will proceed in two steps:

1) Browser sends the request to your webserver [e.g IIS..]..
2) Webserver will identify your web page type and forward to appropriate DLL or Engine..like if page type is .aspx than it will pass to process to the its appropriate engine..

Now lets see hows internally this request has been handled:

As for example we are taking ASPX page to handle at web server IIS.

Once IIS passes the request to ASP.NET engine page has to go through two section HTTP module and HTTP handler. Both these section have there own work to be done in order that the page is properly compiled and sent to the IIS.Both work as follow to complete the Request cycle of web page.

HTTP modules watch/inspect the incoming request and depending on that they can
pass/forward to appropriate way to handle it. Authentication of page is also handle in this section only..

HTTP handler actually compiles the page and generates output.

If you see your machine.config file you will see following section of HTTP modules.

< httpModules>
< add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
< add name="Session" type="System.Web.SessionState.SessionStateModule" />
< add name="WindowsAuthentication"
type="System.Web.Security.WindowsAuthenticationModule" />
< add name="FormsAuthentication"
type="System.Web.Security.FormsAuthenticationModule" />
< add name="PassportAuthentication"
type="System.Web.Security.PassportAuthenticationModule" />
< add name="UrlAuthorization"
type="System.Web.Security.UrlAuthorizationModule" />
< add name="FileAuthorization"
type="System.Web.Security.FileAuthorizationModule" />
< add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule,
System.Web.Mobile, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>

Ok now the HTTP handler is where the actual compilation takes place and the output is generated.Following is a paste from HTTP handler section of WEB.CONFIG file.

< httpHandlers>
< add verb="*" path="*.jsl" type="System.Web.HttpForbiddenHandler" />
< add verb="*" path="trace.axd" type="System.Web.Handlers.TraceHandler" />
< add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
< add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory" />
</httpHandlers>

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

With Regards..

Ashish Shah
India




Responses

Author: Trupti    30 Jul 2008Member Level: Silver   Points : 0
Really a gre88888 article with easy explanation.


Author: Ashish Shah    31 Jul 2008Member Level: Gold   Points : 1
Ohh thankx for your kindly comment..

With Regards..

Ashish shah
India,surat


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Requests in ASP.net  .  HTTPModule  .  HTTPHandler  .  HTTLModule  .  ASP.net FrameWork  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Set the text on a Cell in a DataGridView
Previous Resource: Delegates in C#
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference call

Contact Us    Privacy Policy    Terms Of Use