Question

Photo of Aaron Porter

0

Validation of Viewstate MAC failed

Howdy Rockers!

I've been throwing this exception on our contact us page. This page houses a User Entry form for a slightly modified version of the default External Inquiry workflow. The page in question: https://my.pinonhillschurch.com/ContactUs


Here's the exception:

An error occurred on the Pinon Hills Church site on page: 
https://my.pinonhillschurch.com:443/ContactUs
HttpException in System.Web
Message
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. See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.
Stack Trace
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
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()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.themes_stark_layouts_rightsidebar_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e22c2559\92c7e946\App_Web_cjsf55p1.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-ViewStateException in 
Message
Invalid viewstate. Client IP: ##.###.#.## Port: 56544 Referer: https://my.pinonhillschurch.com/ContactUs Path: /ContactUs User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:30.1) Gecko/20100101 Firefox/30.1 ViewState: ZMSXzavNCQbUcxIMoXcpJvAPAZYDMlbkE4qFyPjtoMgmdiwpGW437vizrwb9ZzsnaIwdDO8NAtwFt3EjxagGa6i3wppEqT7rtZWBzqeSGigrof+josXzeX8hTZ8m9RlUN97XdVgf/h2s52H0iO16Bz3lqzvVdrWlu19SFqv/3+EKv7rPH9gy4IBm67sKvu+gFr0Mmob911QFdTE6wFpz2KSLniD3LFZWtE3QZaSBWnyWPpDPqMMSU07rJzvR/Ocla2MuYyElpXkkvkeFHJp+fRG7kUQ8gAbPu1QkjQH1mup5uYJ68MGE7D9XBI3/vdbuvuFRGLhYOUePcC2ZAraudRXJa0kmBOmI0ETb8oxwce9B3tw3KGF/Ikx4hRJj7T/DUrIBkv1LEIsZzLtd3Lo5gKifboidzFDMd4IUZH1ibyJo3adTJay/rOA7Jc2kHws7s06ec4MhPvG0E93abFU2chrdoFljP1RanxDs78F2tFZsPBrDNzuv+MQCc70nHeHYCPC0g6720J28l+vL20+JDoQ0u3Rx1USoObHMLb6spMmCI3WpA67ZqB4RFJ4LP+ZZKAgZqGPtVhc5TpDF7B3QzxE7dSc9YlqhDUqS8MlTF+cqF/my/us0SGVOlU641iDpV9jshax5cIrT3A7FhCHMJ7dacWyrFhbSNZ0VJ//kWbKklzswlrc6Xfcb5PFYIorO9WMxJuoJftPYEvG5aj6w9MzUlXEBPfSsJdkgTd7+ceU9IbguM1JRZVNsDEt8RfegmJcWOq/B1oejooCXEDIOLABYaoxZOm8XAqM/rQlrz7ot/dme...
Stack Trace

First thing I checked was something related to my servers machineKey, but that had no effect that I'm aware of. The workflow does work, at least. We do get external inquires, but my big concern is we might be missing some.

We are currently running v6.10

I'm not sure what that next step to troubleshoot is, and would appreciate any feedback and advice!

Thank you!

  • Photo of David Stevens

    0

    The MachineKey wouldn't be the issue in this case.  Double-check that your app pool settings match the Rock Install guide and and try turning Load User Profile on (link).


    Another possibility is that browsers are being left open and the next day their viewstate is invalid.