http pipline, ihttpmodule and filtering responses

Discussion in 'ASP .Net' started by Steven Livingstone, Oct 16, 2003.

  1. Hello all.
    I have a class that modifies the response sent to a user, but it works as
    far as the ReleaseRequestState event and not in the UpdateRequestCache
    event. So two questions :

    1. Background on exactly what and why this is the case would be useful. I
    mean something more than "This event signals that code processing is
    complete and the file is ready to be added to the ASP.NET cache." - i'd like
    to know exactly what is happening under the covers in these events.
    Pointers/explanations appreciated.

    2. If i wanted to modify something in the content in the
    PreSendRequestContent event before the buffer is flushed to the user, is
    this possible? Say i wanted to replace all instances of the string "Java"
    with "dotNet" in the output content for example.

    thanks for any advice,
    steven
     
    Steven Livingstone, Oct 16, 2003
    #1
    1. Advertising

  2. Steven Livingstone

    MSFT Guest

    Hi Steven,

    Not knoe the details in your class, but the main difference between
    ReleaseRequestState and UpdateRequestCache are:

    ReleaseRequestState occurs after ASP.NET finishes executing all request
    handlers. This event causes state modules to save the current state data;
    UpdateRequestCache occurs when ASP.NET finishes executing a handler in
    order to let caching modules store responses that will be used to serve
    subsequent requests from the cache.

    You may check if this cause your class didn't work in UpdateRequestCache

    And you may refer to following article form more information on this:

    INFO: ASP.NET HTTP Modules and HTTP Handlers Overview
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q307985

    For your question 2, you may refer to:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Oct 17, 2003
    #2
    1. Advertising

  3. Steven Livingstone

    MSFT Guest

    HI Steven,

    If my explaination is not clear or it didn't answer your question, please
    post your comments here and I will follow up with you.

    Thanks,

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Oct 20, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PJ

    Watch Http Request/Responses

    PJ, Aug 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,376
    Ken Cox [Microsoft MVP]
    Aug 16, 2003
  2. Replies:
    5
    Views:
    408
    p-d-p=pas-de-spam
    May 8, 2006
  3. sqlman
    Replies:
    1
    Views:
    353
    Andrew Morton
    Jul 17, 2009
  4. koranthala
    Replies:
    1
    Views:
    440
  5. Lee Greco

    Add custom HTTP Header to all Web Service responses

    Lee Greco, Jun 13, 2008, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    267
    Tiago Halm
    Jun 17, 2008
Loading...

Share This Page