Viewstate MAC Address Validation Fails ASP.Net 2.0 SP2

I checked every post on SO, every post on the Internet, but nothing helps.

I am getting viewstate MAC address health check error. Suddenly, a crash started on our production server. However, it works on our intermediate server, and the files are identical. We found that our production server has SP2, and the staging server has SP1.

We are not on a website. I added this machine key to web.config:

<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="SHA1"/>

I also tried all the workarounds: http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx .

One more thing I should mention; this does not occur after the postback. This happens after the redirect. It seems that most of the cases that I saw on the Internet occur after the postback. Not sure if this has anything to do with the error.

Anyway, does anyone have any ideas?

+3
source share
1 answer

I recently had a similar problem. Here is what I did:

  • Make sure the items formdo not have an attribute action.
  • Generated unique machineKeyto the application instead of using AutoGenerate. You can use this tool to make it easy.

Good luck

+5
source

Source: https://habr.com/ru/post/1717447/


All Articles