Forum Discussion

Misty_Spillers's avatar
Misty_Spillers
Icon for Nimbostratus rankNimbostratus
Jun 09, 2015

Viewstate errors after moving a VS from and old LTM to a new one

I have an old LTM running 9.4.4 that I am slowly moving the VSs to an 11.5.1 HF7 LTM. The second I moved one high volume, working fine VS from on to the other the users started reporting errors. (see below) The settings are very similar. I'm not an IIS expert but I'm not sure why we would need to make changes on the servers that were working fine before I moved the VS. (The error kind of suggests that we should make server changes) Has anyone experienced this?

 

Here is the error:

 

Server Error in '/app' Application.

 

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: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

 

  1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C" Debug="true" %>

 

or:

 

2) Add the following section to the configuration file of your application:

 

 

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

 

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

 

Stack Trace:

 

[ViewStateException: Invalid viewstate. Client IP: 11.11.11.11 Port: 64246 Referer: https://www.fake.com/app/GetCreditCardInfo.aspx?TransactionId=251988 Path: /app/GetCreditCardInfo.aspx User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET4.0E) ViewState: /wEPDwUKLTkyMzcxMDc4OQ9kFgICAQ9kFkgCAw8WAh4JaW5uZXJodG1sBRdDb25maXJtIFBheW1lbnQgRGV0YWlsc2QCBQ8PFgIeBFRleHQFIUJvYXJkIG9mIENvdW50eSBDb21taXNzaW9uZXJzIFBCQ2RkAgcPDxYCHwEFFSBNLTIwMTEtMDAyODY4LTAwMDAgIGRkAgkPDxYCHwEFBTUwLjAwZGQCCw9kFgICAg9kFgICAQ8PFgIfAQUEMS4yNWRkAg0PDxYCHwEFBTUxLjI1ZGQCDw8PFgQfAQUHU2VydmljZR4HRW5hYmxlZGhkZAIRDw8WBB8BBQdBbWVyaWNhHwJoZGQCEw8QDxYCHwJoZBAVBQAEQU1FWAhESVNDT1ZFUgZNQVNURVIEVklTQRUFAAJBWAJOUwJNQwJWUxQrAwVnZ2dnZxYBAgNkAhUPDxYCHgdWaXNpYmxlZxYCHgdvbmNsaWNrBRJmblNlbGVjdENhcmQoJ1ZTJylkAhcPDxYCHwNnFgIfBAUSZm5TZWxlY3RDYXJkKCdNQycpZAIZDw8WAh8DZxYCHwQFEmZuU2VsZWN0Q2FyZCgnQVgnKWQCGw8PFgIfA2c...]

 

[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) +198 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +432 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose) +8 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +40 System.Web.UI.HiddenFieldPageStatePersister.Load() +248 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +88 System.Web.UI.Page.LoadAllState() +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245 System.Web.UI.Page.ProcessRequest() +72 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +58 ASP.getcreditcardinfo_aspx.ProcessRequest(HttpContext context) +37 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

 

2 Replies

  • I'm using the default "cookie" persistence profile which has the same setting as my older LTM.

     

    Also, I wanted to add we downed one of the servers and the problem went away so something is going on with persistence.