1

In my application I have an action filter with order 0 to handle timeout (we check if the session is null. If yes, then direct the user to timeout page) which is decorated on all Controller actions. But, I was seeing an intermittent behavior wherein timeout wasn't gracefully handled all the times. Then I figured out that, in the Custom Model binder we were checking the session if it is null and, were throwing null reference exception if it is.

Does someone know why this is intermittent? Does modal binding and Filter execution execute on different threads?

AB.
  • 55
  • 1
  • 2
  • 8

1 Answers1

0

No all on same thread. Model Binding has no relationship to Session Timeout.

You don't have raise an exception if your session times out. You can redirect to Login or call a method to re-populate your session variables in your action filter

Renaissance
  • 798
  • 5
  • 15