I've just downloaded and installed the trial of NetAdvantage for ASP.NET and I am presented with the following message on page load:
“ Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. "
Is there a solution to this problem? I have seen this question asked before (unanswered) in the WebGrid forum somewhere, but I figured it was a configuration problem (since I am experiencing it with another control). Obviously, at this stage, not being able to get the control (WebHtmlEditor in this case) working, we are going to have to cut our losses and find something else.
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
I found some info saying it could be caused by a bug in .Net 2.0 or later. http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspxHere is what I found:“If you are using .NET 2.0 or later, please upgrade to .NET 3.5 SP1 (.NET 2.0 SP2) as it has a fix in it that should resolve this issue. ”
I also get the same error while using WARP, but when I remove the WARP and do a full postback, the MAC validation does not fail. Does it make sense?
BTW, Using Goatee solution solves it even though I'm not sure this is the correct way to handle it, is it?
Thanks,almes
I've encountered the same problem (in our case it's the full version of NetAdvantage2008 v1). I have an extremely simple form with nothing more than a button and a WARP, inside which is an ASP.NET DataRepeater. The result set is large, which seems to be the standard trigger. I've added the much-discussed attributes to both the page header and web.config, and the error occurs every time.
Benjamin Haag
Adding/Modifiying the following into the Web.config for the project fixed it. I didn't have the viewStateEncryptionMode attribute before.
<system.web> <pages enableEventValidation="false" viewStateEncryptionMode="Never"> </system.web>
<pages enableEventValidation="false" viewStateEncryptionMode="Never">
</system.web>
I found it on the geekswithblogs link you posted. I can now actually load a page with the WebHtmlEditor and evaluate it. Thanks.
Just a quick follow-up - I see that the bug is marked "closed" by Microsoft in July 2007, so maybe some service pack addresses that? (weird though, since I see no official information for this).
I also found out the official Microsoft workarounds database for this problem (8 cases and 8 workarounds suggested there)
http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=101988