HttpModule RRS feed

  • Question

  • User-1430263770 posted
    Hello, there are several stages in the HttpModule,:
    1- BeginRequest
    2- AuthenticateRequest
    3- AuthorizeRequest
    4- AcquireRequestState

    I want to know where is the page executed in this sequence? Executing the page, does it mean that the page-life cycle moves? I mean, when moving in the above HttpModule, we start stage after stage, the page in executed (page_init, page_load, ...), then continue with the HttpModule.

    Then, when can I use the Session variables? Request.Form variables? For example, I have a hidden field on the page, but since the page is executed some where, then I can access the hidden field in one of the HttpModule stages right?

    When is the full HttpContext.Current available?

    Thank you so much,
    Tuesday, July 19, 2005 1:34 PM

All replies

  • User-1469150719 posted
    Well definitely after all those events you listed.  A simple spike should give you the answer.
    Wednesday, July 20, 2005 12:24 PM
  • User-1069184416 posted
    Well definitely such a reply wouldn't help our friend at all!!

    As you know, the asp.net web application passes through a PipLine, where several modules are executed.
    Usually, the Session State can be accessed in the AcquireRequestState, and the Context, can be used in any method inside an Http
    Module. For instance, you can read a Hidden Field if it exists in the request coming to server in the BeginRequest.

    Hope that helps a bit.


    Wednesday, July 20, 2005 12:55 PM
  • User891958326 posted
    Following is the sequence of HttpModule events:

    1. BeginRequest
    2. AuthenticateRequest
    3. AuthorizeRequest
    4. ResolveRequestCache
    5. AcquireRequestState
    6. PreRequestHandlerExecute
    ---> HTTP GET xyzPage.aspx // This is when the page is executed
    7. PostRequestHandlerExecute
    8. ReleaseRequestState
    9. UpdateRequestCache

    Sunday, August 7, 2005 2:48 AM