Validation of viewstate MAC failed

Posted by Community Admin on 04-Aug-2018 20:49

Validation of viewstate MAC failed

All Replies

Posted by Community Admin on 29-Dec-2010 00:00

Got this error just recently with the RC2 build.   I also have the extremely frustrating bug of being logged out from the backend very frequently and its even worse when uploading files.  The site is hosted on discountasp shared hosting using the same recommendations provided in the sitefinity documentation.

Posted by Community Admin on 29-Dec-2010 00:00

Hi Michael,

Do you use a web farm/garden? If yes, have you checked the machine keys and encryption algorithm?
The other issue you have is related to the application pool recycle and when you try to upload a file you reach your hosting plan limits, the pool gets recycles and you are logged out, because of the bug we have ( which we will try to fix ASAP)

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Dec-2010 00:00

no we are using discountasp's sitefinity plan.  I've only seen that error once, no idea how to reproduce it.

Posted by Community Admin on 16-Jan-2011 00:00

I though I'd jump in to this thread as it relates to my problem.

I signed up for the sandbox version of the newly released Sitefinity 4.0 to evaluate it. After logging in and trying some basic features I logged out. When I returned a while later, I got the following error when attempting to log in again:

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.

Any idea how this can be solved (seeing that it is the hosted sandbox)?

Posted by Community Admin on 17-Jan-2011 00:00

Hello Michael,

Can you please check if this will help? http://community.discountasp.net/showthread.php?t=7814

Best wishes,
Georgi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Jan-2011 00:00

Hello Michael,

I checked your sandbox installation and it is up and running. Please try to access the website again and let me know if the problem persists.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Jan-2011 00:00

Yes, it works fine now. I can log in.

It must have been that the browser had not been closed between the previous logins.

Thank you!

Posted by Community Admin on 25-Jan-2011 00:00

Hello all,

I have the same issue as Mikael.
Please advice.

Roland

Server Error in '/' Application.

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\v4.0.30319\Temporary ASP.NET Files\root\6a2acfb2\ca5366f4\App_Web_telerik.sitefinity.resources.sitefinitydefault.aspx.f785aa1a.eltgixzw.0.cs    Line: 0

Stack Trace:

[ViewStateException: Invalid viewstate. 
	Client IP: 188.25.219.169
	Port: 50684
	Referer: http://roland.sandbox.sitefinity.com/Sitefinity/Login?ReturnUrl=/sitefinity
	Path: /Sitefinity/Login
	User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ro; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
	ViewState: /wEPDwUENTM4MWQYAgUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFG0xvZ2luRm9ybUNvbnRyb2wkUmVtZW1iZXJNZQUQTG9naW5Gb3JtQ29udHJvbA9lZMXuFw04l7kHHZj+11Ni5xuKdzW1secifzHbFwH+Wqga]

[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) +198
   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +274
   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() +241
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +106
   System.Web.UI.Page.LoadAllState() +43
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.sfres_telerik_sitefinity_resources_sitefinitydefault_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\6a2acfb2\ca5366f4\App_Web_telerik.sitefinity.resources.sitefinitydefault.aspx.f785aa1a.eltgixzw.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Posted by Community Admin on 26-Jan-2011 00:00

Hello Michael,

Your website should be running fine now. We know about this issue and we are working on it.

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 13-Feb-2011 00:00

Hello Ivan,

We are facing the same issue, please elaborate more about the source of the bug and how can we fix it.

Thanks.

Posted by Community Admin on 17-Feb-2011 00:00

Hello AmrElsayed,

Can you please make sure that you have a machine key configuration in your web.config file as described in this article.

Regards,
Radoslav Georgiev
the Telerik team

Posted by Community Admin on 01-Apr-2011 00:00

I have the same issue in my sandbox as all of the above


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.  

Please fix mine.   Also How can I restart my sandbox to use a chariety starter kit?

Posted by Community Admin on 08-Apr-2011 00:00

Hello AmrElsayed,

Excuse us for the late response. We don't offer the possibility to restart your sandbox solutions as of today. We have been discussing whether to provide such an option and if there is a significant amount of requests for that we will do our best to provide it in the near future.

It is possible to receive such kind of messages if you are preloading the page much faster as the viewstate field is not yet loaded, and thus cannot be properly validated on the server. With the 4.1 release that is due next week, we have made significant improvements of the lifecycle of our pages which should get rid of such problems.

Kind regards,
Hristo Borisov
the Telerik team


This thread is closed