Click here to Skip to main content
15,745,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
error occur in asp.net

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.
Posted
Updated 6-May-14 19:50pm
v2

follow the link for more info:

Validation of viewstate

To fix this need to set the EnableViewStateMAC property to false.

else you can also try this:

how-to-fix-the-validation-of-viewstate


Hope it helps :)
 
Share this answer
 
v2
Comments
[no name] 6-May-14 5:59am    
EnableViewStateMAC its not secure for all time
Sanket Saxena 6-May-14 6:09am    
did it resolves your issue or not?
[no name] 6-May-14 6:11am    
no.still trying.
Sanket Saxena 6-May-14 6:13am    
alright see my updated ans... a new link added.
[no name] 6-May-14 6:18am    
ya i saw ur article i couldn't understand anything
HTML
<machineKey validation="SHA1" validationKey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1B2C3D4E5" decryption="Auto" decryptionKey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1"/>


I was wrote this code in vs2012 ultimate.u can wrote this code in wbconfg...
 
Share this answer
 
v2
If you have more than one server that hosts your ASP.NET app, you should use the same machine key on all the servers. Otherwise, when a page served by one server posts back to another server, the second server will not be able to validate the viewstate.

Check this link for more information.
http://msdn.microsoft.com/en-us/library/ms998288.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900