我有兩臺服務器IIS6負載均衡由負載平衡硬件完成。當響應提供Server 1
和回發由Server 2
處理它總是會得到一個錯誤The state information is invalid for this page and might be corrupted
和下方Invalid viewstate
上幾乎每回發當請求被替代服務器來處理。 如果我關閉其中一臺服務器,那麼它似乎工作正常。錯誤消息:狀態信息對於此頁無效並可能已損壞(無效的視圖狀態)
我檢查了decryptionKey
和validationKey
都是正是同樣在這兩個服務器的部署,也問心無愧enableEventValidation="false"
和enableViewStateMac="false"
。 Google提供的各種解決方案都沒有運氣:P
請檢查以下堆棧跟蹤,其中exception
出現在HiddenFieldPageStatePersister.Load()
後面跟着Page.LoadPageStateFromPersistenceMedium()
。
[ViewStateException: Invalid viewstate.
Client IP: 192.168.5.21
Port: 60042
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
ViewState: {VIEWSTATE DATA}
[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +118
System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +13
System.Web.UI.HiddenFieldPageStatePersister.Load() +222
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +107
System.Web.UI.Page.LoadAllState() +43
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6230
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +247
System.Web.UI.Page.ProcessRequest() +79
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +23
System.Web.UI.Page.ProcessRequest(HttpContext context) +111
OrderJourneyDefault.ProcessRequest(HttpContext context) in C:\inetpub\wwwroot\x\Default.aspx.cs:350
ASP.toj_application_orderjourney_default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\82a64fa9\62e4fa0\App_Web_31vcm2al.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +406
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76
注:有沒有AJAX/JavaScript的相關的事情搞砸了我的申請。
在此先感謝。
Munim