4

I'm facing a strange delay between the subject events (more or less 500ms each call).

I placed logs and profiling in the handlers in Global.asax Application_PostMapRequestHandler() and Application_AcquireRequestState() and found such issue.

What's the cause of this slowness?

Satpal
  • 132,252
  • 13
  • 159
  • 168
Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46
  • Strange, take a look here, both methods are called one after the other in sequence. http://blogs.msdn.com/b/tom/archive/2008/05/27/asp-net-application-life-cycle.aspx – Fals Sep 16 '13 at 17:02
  • Yes, that's exactly why I'm so puzzled!! I cannot figure out what's going to be done between these two consecutive phases... Perhaps some locking activities? – Cristiano Ghersi Sep 17 '13 at 19:24

1 Answers1

5

This is because if Session State is enabled for a controller - then only one request will execute at a time for each session.

More information is available in the following answer - see the second answer.

IRequiresSessionState vs IReadOnlySessionState

Community
  • 1
  • 1
Josh Robb
  • 66
  • 1