Using ASP.NET 2.0.
I am getting the following error when trying to login to my webapp using the new Login controls in ASP.NET 2.0. My hosting company is not sure what to do at this point. Any ideas?
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2524520
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +184
[ViewStateException: Invalid viewstate.
Client IP: 208.49.199.5
Port: 35574
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)
ViewState: /wEPDwUKLTk4MDM0NDMyMg9kFgJmD2QWAgIDD2QWAgIDD2QWAgIBDzwrAAoBAA8WAh4IVXNlck5hbWUFB2JiZWV0aGVkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgUrY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRMb2dpbjEkUmVtZW1iZXJNZQUxY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRMb2dpbjEkTG9naW5JbWFnZUJ1dHRvbouSt+L64m+K0zk04G5MXQa2+0IA
Referer: http://classes.beethe.net/login.aspx?ReturnUrl=%2fDefault.aspx
Path: /login.aspx]
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that 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) +116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +221
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +0
System.Web.UI.HiddenFieldPageStatePersister.Load() +180
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7901
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +217
System.Web.UI.Page.ProcessRequest() +11
System.Web.UI.Page.ProcessRequest(HttpContext context) +56
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +152
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64