Validation of viewstate MAC failed even when using same machinekey RRS feed

  • Question

  • 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.

    Hi All,

    I have a  setup with two webapplications deployed on two different servers using two different frameworks.
    Now while trying to navigate to a different website using response.redirect, I get the above error.

    I fully understand that in a scenario like this where we are using Web Farms/Clusters we need to have a same machine key defined in all the webapllicataions involved.

    I have the below machine key generated and put in the web.config file of both the web applications.

    <machineKey validationKey="9432CE9098832D4D96DF57EA73D29C133B0E78843758DC529019EA93EEF3FB9F4AB1396056E18DFF476A174FA3B9C7C4B1978DC428A8D64A518F74801B002506"
    decryptionKey="B4347AFB5A4A9A87948A0CAC2778ADD288A53193922F46E7" validation="SHA1"/>

    Could somebody please let me know, what is it that I need to be doing to make it work.

    Thanks in advance.

    Suudeep Kukreti
    Wednesday, September 3, 2008 1:56 PM