Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Towards Completely Demystifying ASP.NET Requests

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Cramer - 06 Mar 2008 05:27 GMT
After having worked with ASP.NET for several years, I believe I understand
the high-level sequence of events that occur when a page is requested. But
now I want a deeper level of understanding. In short, I want to fully
understand *everything* that happens with a request, from the time IIS gets
it, through the ASP.NET pipeline, and ultimately the Page class finally
handling the request and going through its lifecycle. My plan would be to
start with a very simplistic page, then add complexity (ultimately a bunch
of server controls, AJAX callbacks, etc).

My question is how to best go about seeing as much of this activity (in
action) as possible.

I understand that, using VS 2008, we can look at .NET Framework source code
and even step through it. That would be helpful for understanding the inner
workings of a particular control being loaded into a page. Lutz Roeder's
Reflector could also come in handy when I want to understand how some of the
classes work.

What other tools are available to me? How can I have a look at the incoming
Http headers, for example?

Please note that I'm wanting to *see* the Request being processed - at least
as much as possible. I'm not interested in any reading materials, as I think
I've done enough reading. I want to see this in action, or at least stop the
action so I can see what's going on at a particular point in the processing
activity. Suggestions are appreciated!

Thanks.
bruce barker - 06 Mar 2008 06:03 GMT
install fiddler to see request and response information.

there is not a lot of code for processing a page request at high level
(reflector is good enough for this). you pretty much need to read the
docs to understand how the iis hands the request to the asp.net
processor (all different for iis 7.0). but its basically a stream in/
stream out via rpc.

for ajax, the javascript is a resource in the web extensions dll (or use
firefox and dev/firebug extension to see/debug javascript). its pretty
simple code to go thru.

the textbox is a pretty simple control to follow event firing
(ondatachange), but to know control events, write a simple control based
on <span><input type=text/><img/></span> and implement server side
onchange, onclick, and autopostback (if img clicked). this should not
take over a hour or so, and is not many lines of code. hint: you will
need to use viewstate to do onchange.

also you could write so helper debug functions (or ide addin) for
accessing the input request. the w3c http 1.1 spec will tell you
everything need to understand the request/response.

if you use com (bad idea), review the thread pool handling for com
object support (especially sta objects).

serialization is done via a runtime code generator, but if you
precompile serialization, you should be able to use reflector to see the
code.

-- bruce (sqlwork.com)

> After having worked with ASP.NET for several years, I believe I understand
> the high-level sequence of events that occur when a page is requested. But
[quoted text clipped - 24 lines]
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.