Towards Completely Demystifying ASP.NET Requests

Discussion in 'ASP .Net' started by Robert Cramer, Mar 6, 2008.

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

    Robert Cramer, Mar 6, 2008
    1. Advertisements

  2. Robert Cramer

    bruce barker Guest

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

    -- bruce (
    bruce barker, Mar 6, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.