0

I have a web application written in ASP.NET. I have some wierd problems sometimes in which I get ThrowMacValidationError/Invalid viewstate. I have noticed that these errors occur in android clients and/or iphone clients. However, I've tested my site in both devices and did not have this problem.

What can cause this?

Thanks!

Update: It happens on IE9 too sometimes. This seems to be very 1 out of many requests... I cant point my finger on this.

Himberjack
  • 5,682
  • 18
  • 71
  • 115
  • It seems that this is a server configuration issue: http://blogs.msdn.com/b/tess/archive/2009/04/14/validation-of-viewstate-mac-failed-after-installing-net-3-5-sp1.aspx – Peter Knego Dec 11 '11 at 09:14
  • @PeterKnego, I am using .NET v4... is it still might be the solution? – Himberjack Dec 11 '11 at 09:37

1 Answers1

1

There are many conditions that may throw a ViewState Exception but I guess that this link Does viewstate expire may answer the most likely case, especial for mobile device.

Here is why mobile device are more exposed to this issue:

  1. I visit MyPage.aspx with one PostBack link called MyPostBackLink.
  2. Before clicking on that link I get a SMS or any other distraction that causes me to forget about the web page.
  3. 20 minutes later (default Session expire time) I remember about that web page.
  4. Open the Mobile browser and MyPage.aspx is still there and loaded.
  5. Click on MyPostBackLink and I get a generic ViewState exception.

Does viewstate expire also gives different ways of "fixing" this.

Community
  • 1
  • 1
plauriola
  • 178
  • 3