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.
There are several ways to get around this problem:
1) Host your site on a server where the application pools never recycle! Obviously, this is impossible in Shared Hostings. You need a VPS server or dedicated server, where you can configure your own settings.
2) Disable ViewstateMac by putting this “enableViewStateMac="false"” in your web.config. This approach is not 100% secure.
3) Configure ASP.NET to not use Auto-Generated Key but rather a predefined key. This is the preferred method.
To do this, follow these steps:
a) Either build your own Key Generator (https://support.microsoft.com/en-us/help/313091) or use this tool (http://www.allkeysgenerator.com/Random/ASP-Net-MachineKey-Generator.aspx). I highly recommend you use the online tool. So assuming you will use the online tool:
b) In the online tool, simply click on “Generate”.
c) Copy the content in the textbox into your site’s web.config file. The machineKey node should be within <system.web>
validationKey="2EEA416CEFC6D6BE856ED57B97FB9CA7DFACE17C073125949A1D682C80A44BB2AD887DDDC13DBFB0954F1000FEE5757E99693F222F8E28CAA2E6DAB8C4F99E0C" decryptionKey="877478B2F33A74226ABEF55FDCC1A76E43F1BBEA6241A592" validation="SHA1" />
For more information on viewstate troubleshooting, see http://support.microsoft.com/default.aspx?scid=kb;EN-US;829743
- 6 Users Found This Useful
For customers who are looking for a URL rewrite function (like Apache's mod_rewrite) on our...
Using the following code in your web.config file automatically redirects visitors to the HTTPS...
With our Windows hosting accounts, you can create caching rules to enhance your website's speed...
The following configuration sample adds an HTTP "Cache-Control: no-cache" header to the response,...
Scheduling Tasks (Windows) If you need to run scripts on your hosting account at specific time,...