stearnst-cwu
-
4/28/2009 2:41:10 PM
RE:ViewState
I was just using a simple ViewState["variable"] = "test";
and trying to retrieve it after a postback.
However, I changed these to Cache and everything started working again.
However, now sometimes this error popups and I am no longer explicitly using viewstate. Nor am I using a Web Farm or cluster. I haven't looked too much at different solutions to this but I will have to try later.
[HttpException (0x80004005): 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.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +148 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +10956181 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +59 System.Web.UI.HiddenFieldPageStatePersister.Load() +10956280 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +11040040 System.Web.UI.Page.LoadAllState() +46 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11035559 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11035098 System.Web.UI.Page.ProcessRequest() +91 System.Web.UI.Page.ProcessRequest(HttpContext context) +240 ASP.cmspages_portaltemplate_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\kenticocms\6fdd8ad5\5744711\App_Web_5s060xoc.34.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
|