I've got a couple of odd tidbits that have been nagging at me all day...
1) we've got an HttpModule that registers for BeginRequest, ReleaseRequestState, and EndRequest. The main purpose of which is that when we're serving regular html pages, we want a hook to re-write and encrypt the query strings on hrefs in the html we generate.
The filtering is attached in the ReleaseRequestState event handler of our module (context.Response.Filter = new MyFilter(...);).
But when we are running a page that's going to result in an xml document, the ReleaseRequestState event handler doesn't appear to fire at all only BeginRequest and EndRequest.
I've found some documentation that says HttpApplication.CompleteRequest() will bypass a lot of the event change and go directly to EndRequest, but nowhere do we call CompleteRequest(). So I'm thinking there are other things lower down that call it or other
ways of bypassing ReleaseRequestState.
When we set up to produce the report xml, we do a Response.Clear(); and then create an XmlWriter on Response.OutputStream. Would either of those cause something lower down to bypass the ReleaseRequestState event?
2) So we're testing running reports with a lot of data, and for some reason about 9-10 minutes into the run, IIS simply closes the connection and the browser complains. Watching it in Fiddler, Fiddler also says the server just chops the connection. The
IIS log lines for the requests has sc-status 200, sub/win statii 0. Under time taken it's about 600,000 milliseconds. IIS says curiously that it always sent 9711 bytes to the client but the client never sees them.
Our web.config has httpRuntime with executionTimeout=7200 and compilation debug=true. When I run a test aspx page, Server.ScriptTimeout is something like 30 million seconds. I've got healthMonitoriing enabled, and an Application_Error method set to log
any and every unhandled exception. Nothing ever shows a peep.
Because it uses a fair amount of memory, it's not possible to run IIS with a debugger attached, so I'm scratching my head trying to figure out why the phone gets hung up.
mmodrall
Member
24 Points
50 Posts
ReleaseRequestState event not firing in HttpModule?
Mar 01, 2013 09:50 PM|LINK
Hi...
I've got a couple of odd tidbits that have been nagging at me all day...
1) we've got an HttpModule that registers for BeginRequest, ReleaseRequestState, and EndRequest. The main purpose of which is that when we're serving regular html pages, we want a hook to re-write and encrypt the query strings on hrefs in the html we generate. The filtering is attached in the ReleaseRequestState event handler of our module (context.Response.Filter = new MyFilter(...);).
But when we are running a page that's going to result in an xml document, the ReleaseRequestState event handler doesn't appear to fire at all only BeginRequest and EndRequest.
I've found some documentation that says HttpApplication.CompleteRequest() will bypass a lot of the event change and go directly to EndRequest, but nowhere do we call CompleteRequest(). So I'm thinking there are other things lower down that call it or other ways of bypassing ReleaseRequestState.
When we set up to produce the report xml, we do a Response.Clear(); and then create an XmlWriter on Response.OutputStream. Would either of those cause something lower down to bypass the ReleaseRequestState event?
2) So we're testing running reports with a lot of data, and for some reason about 9-10 minutes into the run, IIS simply closes the connection and the browser complains. Watching it in Fiddler, Fiddler also says the server just chops the connection. The IIS log lines for the requests has sc-status 200, sub/win statii 0. Under time taken it's about 600,000 milliseconds. IIS says curiously that it always sent 9711 bytes to the client but the client never sees them.
Our web.config has httpRuntime with executionTimeout=7200 and compilation debug=true. When I run a test aspx page, Server.ScriptTimeout is something like 30 million seconds. I've got healthMonitoriing enabled, and an Application_Error method set to log any and every unhandled exception. Nothing ever shows a peep.
Because it uses a fair amount of memory, it's not possible to run IIS with a debugger attached, so I'm scratching my head trying to figure out why the phone gets hung up.
We're running ASP.Net 4.0 on IIS 6 on W2003.
Any help on either question is appreciated.
Thanks
Mark