C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Aspx page at server side


Posted Date: 20 Oct 2009    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: krishnavenikaladiMember Level: Gold    
Rating: 1 out of 5Points: 10



What exactly happens when ASPX page is requested from
Browser?

Following are the steps which occur when we request a ASPX page :-

step1:

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

step2:

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
1).aspx, for ASP.NET Web pages,
2).asmx, for ASP.NET Web services,
3).config, for ASP.NET configuration files,
4).ashx, for custom ASP.NET HTTP handlers,
5).rem, for remoting resources
Etc
You can also configure the extension mapping to which engine can route by using the IIS engine.

step3:

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. 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>

The above mapping will show which functionality is handled by which Namespace.
Example FormsAthuentication is handled by “System.Web.

Security.FormsAuthenticationModule”. If you look at the web.config section HTTP module
is where authentication and authorization happens.
Ok now the HTTP handler is where the actual compilation takes place and the output isgenerated. Following is a paste from HTTP handler section of WEB.CONFIG file.

<httpHandlers>
<add verb="*" path="*.vjsproj" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.java" type="System.Web.HttpForbiddenHandler" />
<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>


step4:

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

step5:

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.







Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
HTTP MODULE  .  HTTP HANDLER  .  

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: Update the Database
Previous Resource: Print Controls Using C#.Net
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use