+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Validation of viewstate MAC failed

Validation of viewstate MAC failed

13 posts, 0 answered
  1. Michael
    Michael avatar
    59 posts
    Registered:
    02 Nov 2010
    29 Dec 2010
    Link to this post
    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.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    29 Dec 2010
    Link to this post
    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
  3. Michael
    Michael avatar
    59 posts
    Registered:
    02 Nov 2010
    29 Dec 2010
    Link to this post
    no we are using discountasp's sitefinity plan.  I've only seen that error once, no idea how to reproduce it.
  4. Mikael
    Mikael avatar
    2 posts
    Registered:
    27 Sep 2010
    16 Jan 2011
    Link to this post
    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)?
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    17 Jan 2011
    Link to this post
    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
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    17 Jan 2011
    Link to this post
    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
  7. Mikael
    Mikael avatar
    2 posts
    Registered:
    27 Sep 2010
    17 Jan 2011
    Link to this post
    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!
  8. Roland
    Roland avatar
    1 posts
    Registered:
    10 Dec 2010
    25 Jan 2011
    Link to this post
    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
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    26 Jan 2011
    Link to this post
    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
  10. AmrElsayed
    AmrElsayed avatar
    87 posts
    Registered:
    18 Jul 2012
    13 Feb 2011
    Link to this post
    Hello Ivan,

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

    Thanks.
  11. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Feb 2011
    Link to this post
    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
  12. Edward
    Edward avatar
    8 posts
    Registered:
    25 Mar 2011
    01 Apr 2011
    Link to this post
    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?

  13. Hristo Borisov
    Hristo Borisov avatar
    190 posts
    Registered:
    07 Sep 2016
    08 Apr 2011
    Link to this post
    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

13 posts, 0 answered