Validation of viewstate MAC failed. RRS feed

  • Question

  • Hello I have a web application running on .net Framework 2.0. I upgraded the framework version to .net framework2.0 SP2 and installed the patch so that postback events in the web application work fine in IE10 and IE11.

    Post Framework upgrade to SP2 I'm facing with the below issue. Its happening with only one page in the application.

    Event log: Viewstate verification failed. Reason: The viewstate supplied failed integrity check. in the event log....

    When I try to browse on the server itself I get:

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validation key and validation algorithm. AutoGenerate cannot be used in a cluster.

    Stack Trace:

    [ViewStateException: Invalid viewstate.

    Client IP:



    ViewState: /wEPDwuk....

    Referer: http://web:82/XYZ/ASP/select.aspx

    Path: /XYZ/ASP/SelectSummary.aspx]

    The select.aspx has a dropdownlist with EnableViewState="True" in a form with method="Post" and action="SelectSummary.aspx". It has an image button which on clicking will store the value selected in ddl to a cookie and then does a Redirect in the code behind like Response.Redirect(form.attributes["action"]).

    I have checked the below blogs:



    I have set the pages directive in web.config as below

    <pages enableEventValidation="false" viewStateEncryptionMode ="Never" enableviewstateMAC="false" />

    This has not worked.

    If anyone can guide me on this issue, it will be really helpful.



    Thursday, May 8, 2014 11:16 AM