Click here to Skip to main content
15,891,409 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Any one Please help me to solve the following error ? Please tell me why the following error occurs ????
C#
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.
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.

Source Error: 

[No relevant source lines]

Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dacacf13\875c7a52\App_Web_f6jvdcwc.0.cs    Line: 0 

Stack Trace: 

[ViewStateException: Invalid viewstate. 
	Client IP: 1.187.163.30
	Port: 63510
	User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
	ViewState: /wEPDwUJNDAzMDExNTM5D2QWAmYPZBYCAgMPZBYCAgEPZBYEAhMPDxYIHgRUZXh0BXlSRVNVTUUgUkVRVUlSRUQgRlJPTSBGUkVTSCBFTkdJTkVFUklORyBHUkFEVUFURVMgQkFUQ0ggMjAxMiBBTkQgMjAxMy5CcmFuY2g6IEVDRSxDU0UsSVQsUExFQVNFIFNVQk1JVCBSRVNVTUUgSU1NRURJQVRFTFkuHglGb3JlQ29sb3IKJR4EXyFTQgIEHgdWaXNpYmxlZ2RkAhQPFgIfA2dkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBSNjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEJ0blNlYXJjaAUjY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRCdG5NbG9naW6qK1NI/GqZodgnanPVCdn7lZTazw==
	Referer: http://firstcareer.in/
	Path: /Default.aspx]

[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.]
   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106
   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +237
   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.HiddenFieldPageStatePersister.Load() +207
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105
   System.Web.UI.Page.LoadAllState() +43
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dacacf13\875c7a52\App_Web_f6jvdcwc.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.5466; ASP.NET Version:2.0.50727.
Posted
v3

1 solution

Please refer the accepted answer - Validation of viewstate MAC failed[^].
 
Share this answer
 

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