PDA

View Full Version : Validation of viewstate MAC failed - error


mm2000
01-08-2009, 09:44 AM
Hi,

If I leave a page open for few hours and then either (1) hit refresh or (2) click on any link on that page, I get the error message:

'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.'


I get this error many times when I leave a page open and then navigate to a different page. Is there a way to prevent this mac validation error (via web.config file)?

I have set 'enableviewstatemac=false' at page level, but it still doesnt help. Any suggestions?

In addition, how do I ask the site to redirect to a error friendly page, instead of showing this entire error message to customers?

Thanks,
Maddy

bruce
01-08-2009, 11:45 AM
see http://community.discountasp.net/default.aspx?f=24&m=10014