Question

I have an http module that tests for certain values in the BeginRequest method. On failure, I am writing a log and calling Response.End.

Now, I'm also doing a few things with the response in the EndRequest. I'd like to bypass those items if the BeginRequest tests failed. Unfortunately, Response.End doesn't exactly kill the pipeline.

So, is there any way to detect that response.end was called in the EndRequest event OR is there some other way I can accomplish this?

Was it helpful?

Solution

if you only want to know if you called Response.End in your BeginRequest than store a boolean in the HttpContext.Current.Items collection and read that out in the EndRequest

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