locked
Error Handling ViewState RRS feed

  • Question

  • User1465848623 posted

    Hello,

    I have a question regarding error handling a viewState error. Here are the details.

    I have IIS configured to expire at 1 minute.

    I have a javascript timeout running client side set to expire at 2 minutes.

    Obviously these two settings are asking for trouble and that is by design so I can recreate the viewstate error.

    I have a timeout page that alerts the user their session is about to expire. If they click logoff no problem. they are redirected to logon page. If they click the continue session button the _DoPostback is fired client side and yields a viewstate error. Again this makes sense and I am NOT looking to fix this as I know how to fix it. What I am after is how do I capture and gracefully handle/redirect the error as I do elsewhere in the application?

    It seems logical that the post back is happening as we get the viewstate error which can only be thrown when their is a mismatch between server and client key. As mentioned above though I am not seeing any opportunity to handle the error in code behind. Does this happen at the HTTPModule level and thus my application never has a chance to handle the error?

    TIA

    JB

    Thursday, October 20, 2011 10:57 AM

All replies