Trying to run the reportviewer with passing the parameter but receive error:
Validation of viewstate MAC failed error (ASP.NET MVC)
Have tried the following but no luck:
-
added the machine key (http://aspnetresources.com/tools/machineKey) to the system.web tag in web.config
-
set enableEventValidation=”false” to the pages tag in web.config.
any helps?
We had the same problem not a long ago and after a lot of searching the following code has solved the problem:
We have put it in the view in script tags, which is not very beautiful, but it works…
Further details see:
Strange unhandled exception from asp.net application – Validation of viewstate MAC failed and
http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx