Last post Oct 27, 2011 09:08 AM by ramjet69
Oct 20, 2011 10:57 AM|ramjet69|LINK
I have a question regarding error handling a viewState error. Here are the details.
I have IIS configured to expire at 1 minute.
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?
Oct 25, 2011 02:53 AM|Mamba Dai - MSFT|LINK
This blog introduces what causes ViewState error:
And the both references has discusssed the ViewState error, please have a check:
Oct 27, 2011 09:08 AM|ramjet69|LINK
I've seen and read these but I don't see where they answer the OP. Not what causes ViewState. I know that. What I want to know is how to handle gracefully if it is thrown. Perhaps you are saying that there is no real error handling so an ounce of prevention
is the approach?