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?
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
精彩评论