Validation of viewstate MAC failed
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.
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
no we are using discountasp's sitefinity plan. I've only seen that error once, no idea how to reproduce it.
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)?
Hello Michael,
Can you please check if this will help? http://community.discountasp.net/showthread.php?t=7814
Best wishes,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
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!
Hello all,
I have the same issue as Mikael.
Please advice.
Roland
[No relevant source lines] |
[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 |
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
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
I have the same issue in my sandbox as all of the above
Please fix mine. Also How can I restart my sandbox to use a chariety starter kit?
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