Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
this is which type of error.

VB
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


please help.

Thanks
Posted
Comments
Sandeep Mewara 23-May-12 5:30am    
When are you getting this? What are you trying to do on your webpage when you get it? Datagrid data bind? What feature?

1 solution

SQL
The reason for this error is validation of Viewstate failing because of different value of key for encryption/decryption across different server on farm. Below link provide good explanation of this error and possible resolution for the same.



Add these lines in web.config
XML
<system.web>
<pages enableViewStateMac="false" />
</system.web>


OR
Add Machine key on web.cofing
sample machine key

<machinekey>
validationKey="9B648362BE0A4C3FEDD4D9C97F148CA71497C5128BF543DDB37D70AEFBA2F16D184A900A
C1C16331F5E95708BAD6A67286B74CEBBE4ACDEA58B787AF1BD7BFE4"
decryptionKey="86D46880FD9C2F391D9176A24EF22A16560AD69B7AE37146"
validation="SHA1" />


You need to add this to encrypt the ViewState information is a WebFarm
Reference:http://msdn.microsoft.com/en-us/library/ms998288.aspx
Please read the above reference from MSDN you will come to know clearly
 
Share this answer
 
v7

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