Question

I would like to read all content that's been written to the output stream. I'm attempting to do this using an HTTP module, and it seems like the obvious timing would be when handling the PreSendRequestContent event.

However, if the output stream seems to be set to write-only, as I can't read using a StreamReader. Is there a way I read and re-write the content without writing my own IIS module?

Was it helpful?

Solution

Look at the HttpResponse.Filter property.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top