locked
Validation of viewstate MAC failed RRS feed

  • Question

  • User-1783672108 posted

    Hello!

    I am running into a issue after adding 51Degrees Mobile Detection into my ASP.net Web Application. The error is as follows...

    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://go.microsoft.com/fwlink/?LinkID=314055
    
    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 <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
    
    http://go.microsoft.com/fwlink/?LinkID=314055
    
    Source Error: 
    
    
    [No relevant source lines]
    
    Source File: d:\Users\Apezdr\AppData\Local\Temp\Temporary ASP.NET Files\root\d1ff4ebc\111df1fe\App_Web_rpepi0oo.4.cs    Line: 0 
    
    Stack Trace: 
    [ViewStateException: Invalid viewstate. 
    	Client IP: ::1
    	Port: 64094
    	Referer: http://localhost:53012/
    	Path: /Default.aspx
    	User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53
    	ViewState: w6nNbZ0ZqEYDmMzVeBPyx00PvKh0i8xJLWx+CzVdU45S2T+vQV6wt2ejiVAEd+ru+TSgDYwTVKVV881z+0ugO2efJaybAc16sE3B14XoVm+cxrdHHt1sqAYFK8TLTw2uehGFvP9soOpzv5CkC3/8GcCIGy+J+o+c1D4n8TMy6S19TuQS0onu6hZYANwYBHr282xBihfAkHxr1+3kQ4WvbIwp3sRcsXZQISg8lHH9uag=]
    
    [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.
    
    http://go.microsoft.com/fwlink/?LinkID=314055]
       System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +156
       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() +238
       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.default_aspx.ProcessRequest(HttpContext context) in d:\Users\Adam\AppData\Local\Temp\Temporary ASP.NET Files\root\d1ff4ebc\111df1fe\App_Web_rpepi0oo.4.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

    I honestly dont know where to begin with what its saying, any advice from you guys??

    Tuesday, June 17, 2014 8:07 PM