May 11, 2008

The mysterious Validation of viewstate MAC failed

If you're getting this error and you're sure that you are not hosting your web app on a web farm, then this blog post has most of the information you need.

All that because someone decided it would be best to render some hidden fields at the end of the page rather than the beginning...how lame. Anyway I did not like any of the workarounds listed there, but I did find one which I do not particularly hate:
Adding

<meta http-equiv="Page-Enter" content="RevealTrans(Duration=0,Transition=0)" />

to your page will prevent the page from being used until it is fully loaded.

UPDATE
It turns out this only hides the content. The invisible content is still there and can be clicked. So it's not a foolproof solution, but it is an option. I no longer use this method.

Posted by PurpleFlux at 02:26 PM | Comments (0) | TrackBack