Hello All,
I have hosted a site on windows azure and it is running on two instances. I am getting following error:
[ViewStateException: Invalid viewstate. Client IP: 140.237.38.11 Port: 59922 Path: /Webinars.aspx User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ) ViewState: /wEPDwUJODc0MTc5MzM3DxYCHgp0b3RhbENvdW50AgEWAmYPDxYCHgVjb3VudGZkFgZmD2QWCgICDxYCHgdjb250ZW50BYoBUG9zdC5CaWQuU2hpcC4gZW5hYmxlcyB0cmFuc3BvcnRhdGlvbiBwcm92aWRlcnMgdG8gY29tcGV0ZSBmb3IgYnVzaW5lc3MgYnkgYmlkZGluZyB0byBoYXVsIGxvYWRzIHBvc3RlZCBieSBzaGlwcGVycyBvZiBjb21tZXJjaWFsIGZyZWlnaHQuZAIDDxYCHwIFsgFGcmVpZ2h0LCBiaWRkaW5nLCBCaWQgb24gZnJlaWdodCwgRnJlaWdodCBxdW90ZSwgRnJlaWdodCBxdW90ZXMsIEZyZWlnaHQgcmF0ZXMsIExvYWRib2FyZCwgTG9hZCBib2FyZCwgUG9zdCBsb2FkcywgU3VwcGx5IGNoYWluLCBTdXBwbHkgY2hhaW4gbWFuYWdlbWVudCwgRnJlaWdodCBicm9rZXIsIENhcnJpZXJzZAIEDxYCHwIFDElOREVYLEZPTExPV2QCEQ8WAh4EVGV4dAXGBDwhLS0gU1RBUlQgQURNSU4gQ09ERSBCRUZPUkUgL0hFQUQgLS0+DQoNCjwhLS1TdGFydCBvZiBab3BpbSBMaXZlIENoYXQgU2NyaXB0LS0+DQo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQp3aW5kb3cuJHpvcGltfHwoZnVuY3R...]
[HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. http:
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
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)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.webinars_aspx.ProcessRequest(HttpContext context) in d:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\3653c9f4\8117b1a3\App_Web_webinars.aspx.cdcab7d2.yrphmqfl.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
have set up:
<machinekey decryption="Auto" validation="SHA1" decryptionkey="AutoGenerate,IsolateApps" validationkey="AutoGenerate,IsolateApps" />
<pages enableviewstatemac="true" controlrenderingcompatibilityversion="3.5" clientidmode="Inherit" validaterequest="false" pageparserfiltertype="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" pagebasetype="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" usercontrolbasetype="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
But still it is giving errror of invalid viewstate.
I have read that enableViewStateMac="false" is not best practice to do that.
Can somebody helps me.
Thanks,
Amit