开发者

Http Module - detect if Response.End was called

开发者 https://www.devze.com 2023-01-26 03:44 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消