http pipline, ihttpmodule and filtering responses

S

Steven Livingstone

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
 
M

MSFT

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

MSFT

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

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top