Click here to Skip to main content
15,886,032 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Dear Experts,

I have an asp.net web page and it has a button to click and once click that button it's getting few results in a data grid view.

My problem is once I load that page via web browser and after 5 minutes once I'm clicked the button it produced following error:
C#
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.


This problem not occur while I'm testing in Visual Studio in my hard drive and before 5 minutes no problem. Problem occur when it's idle for few minutes and start to do a search.

(Not exactly 5 minutes, around something)

Please help me.
Posted
Updated 18-Jan-14 8:06am
v2
Comments
Wombaticus 18-Jan-14 14:03pm    
This is an annoying problem which can be caused by a number of issues. IF you Google it you will find all sorts of advice, none of which helped me. Eventually I stumbled across something that worked, but it may only help you if your application is using the .NET 4 or 4.5 framework - in which case try adding
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
to the <system.web> section of your web.config file.
If that's not applicable, or doesn't help, try Googling this error - as I say, there is a ton of information out there....

1 solution

 
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