I have two servers on IIS6 where load balancing is done by a load balancing hardware. When a response is provided Server 1
and the postback is handled by Server 2
it always gets an error The state information is invalid for this page and might be corrupted
and underneath Invalid viewstate
on almost every postback when requests are handled by alternative servers. If I turn off one of the server then it seems to be working fine.
I have checked the decryptionKey
and validationKey
are both exactly same on the both server deployment, and also wth enableEventValidation="false"
and enableViewStateMac="false"
. There was no luck with all sorts of solutions available provided by Google :P
Please check the stack trace below where exception
occurs at HiddenFieldPageStatePersister.Load()
followed by 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.HttpApplica开发者_开发技巧tion.IExecutionStep.Execute() +406
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76
NOTE: There's no AJAX/Javascript related things to mess up my application.
Thanks in advance.
Munim
精彩评论