I've spent about two days looking into this issue and can't seem to find a resolution, or the ones provided don't seem to fully address the issue I am having.
- I have an ASP.NET Application, .NET 4.0
- Intermittently, we will get errors about View State corruption
- This only seems to apply to Mozilla based browsers (not 100% sure, trying to get more error logs to confirm)
- It seems to start with no consistent re-produceable action.
- It is NOT related to MAC getting out of sync, we have our machine key / validation key explicitly set and not set to auto-generate
- It is only happening in our Production environment, has never happened in DEV/QAT/UAT
- It is happening on pages that have an Update Panel - while some of the pages do have a very large view-state, a few of them have a very small view-state
- Does not seem to be re-producable. Some solutions I have found have been in relation to 'Click on a page, click on a button that goes to another page, click back in the browser and the error happens' - this is not that case.
- IIS7 on Windows Enterprise 2008, 16GB ram, PAE is enabled.
- The pages will work fine for awhile, and then stop working - restarting IIS solves this issue temporarily.
- This is not running on a Web Farm The exception/stack trace:
Description:
Error occurred System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate.
Client IP: <removed>
Port: 21884
Referer: <removed>
Path: /PathToPage/Page.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8)
ViewState: /wEPDwULLTEyNTU4MDc4NT....<removed by user>... ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Convert.FromBase64String(String s)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
--- End of inner exception stack trace ---
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)