Hey,
I've been working on this issue for a while now, with no leads or
success.
The scenario is a homemade modal dialog using UpdatePanels. There a
couple ImageButtons inside of usercontrols with their OnClick events
delegated to file.aspx.
Here is my error (These happen fairly infrequently, say, 5-10 times an
hour on a site that gets 50-80k on an average day):
SERVERNAME02A,SiteName,3/27/2007 7:12:00 AM,/file.aspx,Invalid
viewstate.
Client IP: xx.xx.xx.xx
Port: 45832
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: /
wEWCALQ6fghAuKV6ZgNAsvZ3rQDAu3q4KkGAu3q1KkGAqWmmK0 NAtCFuSQC4dmoiwJl6EVu373wYYDfEMBcgUWFlDY2DQ==
Referer: http://www.x.com/file.aspx
Path: /file.aspx
We have a server farm using NLB, and have modified our machineKeys to
match, this is not the problem as far as I can tell.
I've attempted to disable viewstate to no avail.
Using a viewstate decoder, I noticed the 'bad' viewstates are
submitting an ArrayList of ints... I don't know why.
The above viewstate in the error translates to this:
<?xml version="1.0" encoding="utf-16"?>
<viewstate>
<ArrayList>
<Int32>71185616</Int32>
<Int32>-753251614</Int32>
<Int32>915909835</Int32>
<Int32>1698182509</Int32>
<Int32>1697985901</Int32>
<Int32>-710536411</Int32>
<Int32>76432080</Int32>
<Int32>560606433</Int32>
</ArrayList>
</viewstate>
Somewhere, somehow, the viewstate is becoming corrupted and is
creating an ArrayList of ints, we have been unable to repro without
submitting the bad viewstate from the logs directly back to file.aspx
manually.
This is the error I get when manually posting the error back to
file.aspx:
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET Files\root\f44720c4\fa913f4b
\App_Web_mypayscale.aspx.cdcab7d2.lj45eshy.0.cs Line: 0
Stack Trace:
[InvalidCastException: Unable to cast object of type
'System.Collections.ArrayList' to type 'System.Web.UI.Pair'.]
System.Web.UI.HiddenFieldPageStatePersister.Load() +168
[ViewStateException: Invalid viewstate.
Client IP: 10.0.0.152
Port: 1875
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:
1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
ViewState: /
wEWCALQ6fghAuKV6ZgNAsvZ3rQDAu3q4KkGAu3q1KkGAqWmmK0 NAtCFuSQC4dmoiwJl6EVu373wYYDfEMBcgUWFlDY2DQ==
Referer: http://liontamer.domain.omitted/fakeviewstate.aspx
Path: /file.aspx]
[HttpException (0x80004005): The state information is invalid for this
page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.HiddenFieldPageStatePersister.Load() +240
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6978
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.mypayscale_aspx.ProcessRequest(HttpContext context) in c:
\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tempor ary ASP.NET Files
\root\f44720c4\fa913f4b\App_Web_mypayscale.aspx.cd cab7d2.lj45eshy.0.cs:
0
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+584
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously) +64
I am seriously at a loss here.
Any help, input, ideas, or solutions are welcome.
Thanks,
-Ty