Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an application developed by visual studio 2013. when i click one button it shows this error.. Please help me to solve this.


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.



Stack Trace:

[ViewStateException: Invalid viewstate. 
	Client IP: ::1
	Port: 59591
	Referer: http://localhost:52796/Main
	Path: /Default
	User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
	ViewState: 3zorm5vDC+GaPgvJXxozCFG2fNOXJ6wWpefO03lTdJitW2SHoc658AjXcZ69EE/ZUA5WcFf9lSBVvAkeHvKTdQ/W6TUzpqWpBeQkSeZhxFU=]

[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.

See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.]
   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
   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() +272
   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 c:\Users\AMNK\AppData\Local\Temp\Temporary ASP.NET Files\vs\00345666\5dcbba65\App_Web_54yu51cx.2.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900