<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx</link><description>Last week I was working with on a case where they were getting this error message HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey</description><dc:language>sv-SE</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#8317495</link><pubDate>Tue, 18 Mar 2008 19:39:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8317495</guid><dc:creator>Jesse</dc:creator><description>&lt;p&gt;Aha! I think that's exactly the problem I'm having with a produciton web application I maintain. Thanks so much.&lt;/p&gt;</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#8324974</link><pubDate>Wed, 19 Mar 2008 09:49:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8324974</guid><dc:creator>Joshua</dc:creator><description>&lt;p&gt;Just thought that I'd point out, that while writing my own blogging software (which, sadly is offline, due to a memory leak (I think) that would take down the server every 12 hours or so - haven't had time to look into it yet) I encountered this a lot with comment spamming bots. They try and post to the page directly with what they pulled earlier, which included a viewstate.&lt;/p&gt;
&lt;p&gt;Of course, trying later caused the viewstate to be invalid. It got so bad, that after I implemented an email function into the global.asax file for handling and reporting errors did I notice that it was averaging about 500+ a day. And my blog was by no means popular.&lt;/p&gt;
&lt;p&gt;On the flip side, it was interesting to see the bots that could load the page, grab a valid viewstate, and manage a successful post (which I was developing anti spam/keyword filtering on). On those, I averaged about 2 to 3 a day.&lt;/p&gt;</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#8325040</link><pubDate>Wed, 19 Mar 2008 10:12:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8325040</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;very interesting... &lt;/p&gt;
&lt;p&gt;I think in your case though you are probably running into this which is very similar (in fact same error message) but different cause...&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/tess/archive/2007/06/11/a-case-of-invalid-viewstate.aspx"&gt;http://blogs.msdn.com/tess/archive/2007/06/11/a-case-of-invalid-viewstate.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I know what you're saying about the spammers, I easily also get around 500 a day which is a bit sad because I have had to turn on comment moderation for a while to avoid getting publishing the spam comments since most of the time they are highly offensive. &amp;nbsp; Lately they have also tried sending captcha text which is a bit ironic given that the blog doesnt use captcha but I guess they send out the same to all &lt;/p&gt;
&lt;p&gt;Community server seems to catch most of the spam comments though these days, so I am leaning more and more towards turning off comment moderation... &amp;nbsp; &amp;nbsp;&lt;/p&gt;
</description></item><item><title>ASP .NET ViewState Validation Errors</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#8331688</link><pubDate>Sun, 23 Mar 2008 00:52:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8331688</guid><dc:creator>David Grey's Blog</dc:creator><description>&lt;p&gt;Tess&amp;amp;#39;s If broken it is, fix it you should blog is always good for a read. Tess is an escalation engineer&lt;/p&gt;
</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#8998065</link><pubDate>Mon, 13 Oct 2008 17:46:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8998065</guid><dc:creator>Craig</dc:creator><description>&lt;p&gt;I saw the same problem on an aspx page with a gridview. &amp;nbsp;All it was was a web tracker js file, at the bottom of the page, that was not getting downloaded. &amp;nbsp;I commented out the tracker and all was well.&lt;/p&gt;
&lt;p&gt;I can't decide if that's a bug in IE, the Framework, or the whole concept of ASP.Net!&lt;/p&gt;
</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#9308687</link><pubDate>Mon, 12 Jan 2009 21:19:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9308687</guid><dc:creator>mike</dc:creator><description>&lt;p&gt;Validation of viewstate MAC failed&lt;/p&gt;
&lt;p&gt;Update: In my case I was NOT using gridview nor DataKeyNames nor slow loading page.&lt;/p&gt;
&lt;p&gt;Small page with on two buttons, two text boxex, and dropdownlist. Clicking the button1 (add) caused the above error every time.&lt;/p&gt;
&lt;p&gt;Problem turned out to be the form action property was pointing to &amp;nbsp;a non-existent page! I used a code-behind method when the Add button is clicked and do not use form.submit. When I cleared the action property of the form, problem went away.&lt;/p&gt;
&lt;p&gt;My &amp;quot;guess&amp;quot; is that the form submit happens before&lt;/p&gt;
&lt;p&gt;the code-behind code is processed, since even in debug I would get the error before the breakpoint was hit. &lt;/p&gt;
&lt;p&gt;Hope this leads to the final answer to this.&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;
&lt;p&gt;Mike.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#9459877</link><pubDate>Thu, 05 Mar 2009 17:52:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9459877</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;this worked for me.&lt;/p&gt;
&lt;p&gt;&amp;lt;pages validateRequest=&amp;quot;false&amp;quot; enableEventValidation=&amp;quot;false&amp;quot; viewStateEncryptionMode =&amp;quot;Never&amp;quot; /&amp;gt;&lt;/p&gt;
</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#9471031</link><pubDate>Thu, 12 Mar 2009 00:55:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471031</guid><dc:creator>Shane</dc:creator><description>&lt;p&gt;Mike, you saved me! &lt;/p&gt;
&lt;p&gt;I had tried every solution I could find for this problem, it turns out just the action property of my form tag was wrong. &amp;nbsp;Thank you very much!&lt;/p&gt;
</description></item><item><title>re: ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tess/archive/2008/03/17/asp-net-viewstate-error-validation-of-viewstate-mac-failed.aspx#9831414</link><pubDate>Mon, 13 Jul 2009 13:46:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9831414</guid><dc:creator>GSingh</dc:creator><description>&lt;p&gt;Hey...&lt;/p&gt;
&lt;p&gt;i do all the things you &lt;/p&gt;
&lt;p&gt;mention in your post and disable the view and event state at application level in web.config, but still getting the same error but at a very low rate then previous one. Do smhtin ;)&lt;/p&gt;
</description></item></channel></rss>