Tuesday, 5 August 2008

Can't request two ASPX pages at once??

So we have some big reports in our app. Not huge, but big enough they take a couple of minutes to run.

Once we gather the parameters for the reports, we whack 'em away into the database (for auditing etc), and grab a ReportRequestID, a unique value for that run.

The requestId is jammed into session, and we window.open() our report viewer page, which grabs the ID, and runs the report for that ID.

Some clever cookie (a tester of all people) decided not to stare idly at the report screen, but to continue using the application in the background... the only problem is the postback doesn't happen until the report completes!! We don't even hit a breakpoint in Application_AcquireRequestState.

Have we hit the 2 requests per server http limitation? Fiddler says no.

Turns out the session in ASP.Net gets locked on a per user basis, for the entirety of the request...
We have the luxury of rolling over to Query String param passing instead, but heaven help us if we legitimately need 2 session enabled requests at once in the future.

No comments: