<?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>Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx</link><description>-- 3/17/2009 UPDATE -- 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.&amp;#160; If you update and still have the problem, please post here so we know. -- 3/17/2009 UPDATE</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8206325</link><pubDate>Fri, 14 Mar 2008 19:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8206325</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8208729</link><pubDate>Fri, 14 Mar 2008 21:55:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8208729</guid><dc:creator>Simone</dc:creator><description>&lt;P&gt;We are having this problem sometimes in subtext when the page is downloaded from slow connections.&lt;/P&gt;
&lt;P&gt;I'll have a look if I can apply these suggestions to my problem. Than you for sharing&lt;/P&gt;
&lt;P&gt;Simo&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8213890</link><pubDate>Sat, 15 Mar 2008 03:33:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8213890</guid><dc:creator>Alex Grenz</dc:creator><description>&lt;p&gt;Thank you for the solutions. I particularly like the third and will use that from now on.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8229201</link><pubDate>Sat, 15 Mar 2008 16:32:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8229201</guid><dc:creator>Rob</dc:creator><description>&lt;P&gt;We used to run into this problem when using large wizard controls. Viewstate would get very bloated and users with slow connections would sometimes click on the "next" button before viewstate was loaded. Our "solution" is to compress viewstate. This really seems to have done the trick:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx" target=_new rel=nofollow&gt;http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx&lt;/A&gt;&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8229542</link><pubDate>Sat, 15 Mar 2008 16:49:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8229542</guid><dc:creator>hudo</dc:creator><description>&lt;P&gt;Only thing that helped me is to add machine key in web.config. And I tried almost everything else...&lt;/P&gt;
&lt;P&gt;You can google for generation tool (&lt;A href="http://aspnetresources.com/tools/keycreator.aspx" target=_new rel=nofollow&gt;http://aspnetresources.com/tools/keycreator.aspx&lt;/A&gt;)&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8237964</link><pubDate>Sun, 16 Mar 2008 05:38:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8237964</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;That is a very good suggestion Rob, compressing the Viewstate can certainly help in some situations and helps to keep the pages download faster which always helps allowing the entire page to load.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8237975</link><pubDate>Sun, 16 Mar 2008 05:43:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8237975</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Hudo, that is usually what we have to do if we are using a Webfarm since you want all the processes to use the same MachineKey.&lt;/p&gt;
&lt;p&gt;Take a look at &lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/312906"&gt;http://support.microsoft.com/kb/312906&lt;/a&gt; for another way, which allows you to create your own tool to create a MachineKey.&lt;/p&gt;
</description></item><item><title>ASP.NET - Validation of viewstate MAC failed!</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8262896</link><pubDate>Sun, 16 Mar 2008 19:14:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8262896</guid><dc:creator>brute forced brilliance</dc:creator><description>&lt;p&gt;ASP.NET - Validation of viewstate MAC failed!&lt;/p&gt;
</description></item><item><title>A few more solutions to the dreaded "Validation of ViewState MAC failed"</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8264798</link><pubDate>Sun, 16 Mar 2008 19:45:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8264798</guid><dc:creator>Joteke's Blog</dc:creator><description>&lt;p&gt;I posted about this some time ago. My previous post: Potential solution for &amp;amp;quot;Validation of viewstate&lt;/p&gt;
</description></item><item><title>ASP.NET Viewstate error - Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8285516</link><pubDate>Mon, 17 Mar 2008 13:55:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8285516</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;Last week I was working with on a case where they were getting this error message HttpException (0x80004005):&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8316719</link><pubDate>Tue, 18 Mar 2008 18:52:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8316719</guid><dc:creator>Rob Achmann</dc:creator><description>&lt;P&gt;I've seen this error on many sites.&lt;/P&gt;
&lt;P&gt;Root Cause? Yes, times for rendering large amounts of viewstate, and 'premature' postbacks cause this. &lt;/P&gt;
&lt;P&gt;Think of another area...what about the firewall? What? Firewall? What's that got to do with rendering web pages? Well, if you have a lot of junk in ViewState, sometimes through no fault of your own, there's a lot of bits and bytes to go through your firewall. Try to see if your firewall limits, or throttles, the amount of bytes allowed for a single post, or IIS request.&lt;/P&gt;
&lt;P&gt;R.&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8320177</link><pubDate>Tue, 18 Mar 2008 22:06:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8320177</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;The firewall is a very good catch also. &amp;nbsp;We haven't seen as many of those but it certainly can cause the same problem. &amp;nbsp;Either increasing the amount of data that it allows through, or trimming the viewstate are the only ways around that.&lt;/p&gt;
</description></item><item><title>ASP .NET ViewState Validation Errors</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8331689</link><pubDate>Sun, 23 Mar 2008 00:52:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8331689</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: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8349784</link><pubDate>Wed, 02 Apr 2008 07:21:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8349784</guid><dc:creator>bastett</dc:creator><description>&lt;p&gt;I've just tried to implement your override Render method and run into a couple of small problems.&lt;/p&gt;
&lt;p&gt;I don't really understand this:&lt;/p&gt;
&lt;p&gt;int FormStart = html.IndexOf(&amp;quot;&amp;gt;form&amp;quot;);&lt;/p&gt;
&lt;p&gt;int EndForm = html.IndexOf(&amp;quot;&amp;lt;&amp;quot;, FormStart) + 1;&lt;/p&gt;
&lt;p&gt;Surely FormStart will never be true, unless you mean to match &amp;quot;&amp;lt;form&amp;quot; rather than &amp;quot;&amp;gt;form&amp;quot;? Also EndForm would match inside the next tag (in my case a div), so you'd end up with &amp;quot;&amp;lt;&amp;lt;input type.../&amp;gt;div&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I changed the IndexOfs to match &amp;quot;&amp;lt;form&amp;quot; and &amp;quot;&amp;gt;&amp;quot; respectively and it seems to work, with the hidden input fields being inserted following the &amp;lt;form&amp;gt; tag.&lt;/p&gt;
&lt;p&gt;Also, in the array of aspnet_formelems, you don't have the VIEWSTATEENCRYPTED tag. I thought the whole point of the workaround was to put this at the top just after the form tag. So I also added this to your array and the issue seems to be resolved.&lt;/p&gt;
&lt;p&gt;Is this what you meant originally, or have I misinterpreted your solution?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8350745</link><pubDate>Wed, 02 Apr 2008 13:59:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8350745</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;bastett,&lt;/p&gt;
&lt;p&gt;You are right, thanks for finding that. &amp;nbsp;That is what I get for trying to do the HTML of a &amp;lt; and &amp;gt;. &amp;nbsp;And good catch on the VIEWSTATEENCRYPTED. &amp;nbsp;I have updated the post to correct those.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8353488</link><pubDate>Thu, 03 Apr 2008 14:23:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8353488</guid><dc:creator>Thomas</dc:creator><description>&lt;P&gt;A common thread in this is problems with the Viewstate in a hidden field - we use Infragistics GridView controls and the size of the Viewstate field frankly becomes ridicoules as the amount of data displayed increased.&lt;/P&gt;
&lt;P&gt;Possibly this tip from MSDN's Wicked Code (see figure 4) is a general and recommendable way to work around this problem:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies/default.aspx#S4" target=_new rel=nofollow&gt;http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies/default.aspx#S4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;PS. That entire article is excellent and I highly recommend reading it! &lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8353839</link><pubDate>Thu, 03 Apr 2008 16:50:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8353839</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Thanks Thomas. &amp;nbsp;That is a a good article for anyone to read and review. &amp;nbsp;Storing viewstate in session has good and bad about it, but if you can handle the additional memory on the server, it will work very well and also allows for smaller pages for your clients to download.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8399177</link><pubDate>Wed, 16 Apr 2008 19:33:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8399177</guid><dc:creator>Boomport</dc:creator><description>&lt;P&gt;This solved the problem for me,&lt;/P&gt;
&lt;P&gt;This is caused by the application pool setting on the performance tab, web garden. &amp;nbsp;Make sure its set to 1, otherwise it will have x app pools who all have different viewstate encryption keys and so it may work if you get the same app pool but the next trip to the server it could bomb if it gets the other app pool.&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8399189</link><pubDate>Wed, 16 Apr 2008 19:43:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8399189</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Yes. &amp;nbsp;That is a good thing to make sure. &amp;nbsp;There are other things that can cause this if you are using Web Gardens or a Web Farm&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8451610</link><pubDate>Fri, 02 May 2008 22:03:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8451610</guid><dc:creator>Jai</dc:creator><description>&lt;P&gt;My webpage works fine on my a workstation but gives "Validation of viewstate &lt;/P&gt;
&lt;P&gt;MAC failed" error when I run it from the PDA.. Any Idea why this wouild be happening? I tried all the solutions given&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8451616</link><pubDate>Fri, 02 May 2008 22:07:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8451616</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Jai,&lt;/p&gt;
&lt;p&gt;Is it a large page? &amp;nbsp;Maybe the PDA has a limit for how much data it will download and cuts off the viewstate.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8451707</link><pubDate>Fri, 02 May 2008 22:45:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8451707</guid><dc:creator>jai</dc:creator><description>&lt;P&gt;Page is not large. Let me explain the exact problem&lt;/P&gt;
&lt;P&gt;I have meta refresh tag on the page which refreshes the page every 20 seconds. First time when the page is loaded on the PDA it refreshes without any issues. when the user clicks on a button he is redirected to a different page. After he submits that page he is redirected to the first page with th erefresh meta tag. First page with Refresh meta tag load and when the refresh is happening it throws this error. I hpe I was able to explain the issue. Appreciate your help on this.&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8461070</link><pubDate>Mon, 05 May 2008 21:07:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8461070</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Jai,&lt;/p&gt;
&lt;p&gt;If you are on a PDA and refreshing every 20 seconds, do you need viewstate? &amp;nbsp;Could you turn that off? &amp;nbsp;If you aren't using state, that would make the page much smaller also. &amp;nbsp;Are there controls which you want to keep their state between refreshes?&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8473311</link><pubDate>Thu, 08 May 2008 21:03:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8473311</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Btw.... how can you disable a form?! or enable it?.. it tried your method but it pops a javascript error.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8474172</link><pubDate>Thu, 08 May 2008 23:11:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8474172</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Martin,&lt;/p&gt;
&lt;p&gt;What is the error you are seeing?&lt;/p&gt;
</description></item><item><title>The mysterious Validation of viewstate MAC failed</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8488620</link><pubDate>Sun, 11 May 2008 22:46:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8488620</guid><dc:creator>PurpleFlux</dc:creator><description>&lt;p&gt;If you're getting this error and you're sure that you are not hosting your web app on a web farm, then this blog post has most of the information you need. All that because someone decided it would be best...&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8507259</link><pubDate>Thu, 15 May 2008 12:18:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8507259</guid><dc:creator>Chris</dc:creator><description>&lt;P&gt;We've been having this exact problem and its caused by having a large page which loads slowly. Your workaround number 3 worked great for us however we've noticed a small issue in the html rendered to the page. The __EVENTVALIDATION was rendered in a div at the bottom of the page, however the __EVENTVALIDATION is now rendered at the top of the page which means this div is blank. Firefox seems to handle this fine however IE doesn't, and it messes up the style of our website. I didn't write the CSS for the website so I don't want to go messing around with it as my CSS skills aren't the best, can you see any issues with me removing the last empty div tag from the html before calling writer.Write(html); in your code?&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8508061</link><pubDate>Thu, 15 May 2008 17:05:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8508061</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Chris,&lt;/p&gt;
&lt;p&gt;I don't see any problem with that. &amp;nbsp;You should be able to do that without any issues.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8554333</link><pubDate>Tue, 27 May 2008 11:53:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8554333</guid><dc:creator>shetty</dc:creator><description>&lt;p&gt;i dono abt these things ..becuase iam a tester ...&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8555436</link><pubDate>Tue, 27 May 2008 23:51:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8555436</guid><dc:creator>Jai</dc:creator><description>&lt;p&gt;I have removed the view state from the page. The issues that I was facing earlier is gone. But now if the user click on teh back button a couple of times he gets this error &amp;quot;Validation of viewstate MAC failed error&amp;quot; Thsi does not happen on the workstation.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8556590</link><pubDate>Wed, 28 May 2008 17:20:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8556590</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Shetty,&lt;/p&gt;
&lt;p&gt;I hope this page helped you then. &amp;nbsp;Let me know if you have any problems or questions.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8556593</link><pubDate>Wed, 28 May 2008 17:23:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8556593</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Jai,&lt;/p&gt;
&lt;p&gt;The easiest way to track something like that down is if you can reproduce it and then get a network trace to see what is being passed back and forth from the server to the client and vice versa.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8570061</link><pubDate>Mon, 02 Jun 2008 22:40:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8570061</guid><dc:creator>raj</dc:creator><description>&lt;p&gt;Hi All ~ If I am facing the problem after deployment; is there any way out to solve the problem without writing code? otherwise I have to test n create the package again. &lt;/p&gt;
&lt;p&gt;Please reply....&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8570176</link><pubDate>Mon, 02 Jun 2008 23:21:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8570176</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Raj,&lt;/p&gt;
&lt;p&gt;It depends of if you consider changes to your config files changes. &amp;nbsp;If if it just that the MAC isn't sync'ed and you are using a web farm. &amp;nbsp;Otherwise, I don't know of a way without code changes.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8712734</link><pubDate>Wed, 09 Jul 2008 18:48:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8712734</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;One other thing that can cause errors like this is if there is a second form tag on the page. &amp;nbsp;So make sure there is just the one form tag that is doing the asp.net post.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8733819</link><pubDate>Tue, 15 Jul 2008 19:32:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8733819</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I love your post and the third solution. It really fixed my problem.&lt;/p&gt;
&lt;p&gt;Although there are several potential bugs in your code if the html is not well formed (for whatever reason). &lt;/p&gt;
&lt;p&gt;I've written a small class called BasePage that fixes those issues and improves the performance a little bit. Then the only thing to do is to extend BasePage instead of Page.&lt;/p&gt;
&lt;p&gt;Check it out:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public class BasePage : Page&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private static string[] aspNetFormElements = new string[] &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;__EVENTTARGET&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;__EVENTARGUMENT&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;__VIEWSTATE&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;__EVENTVALIDATION&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;__VIEWSTATEENCRYPTED&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protected override void Render(HtmlTextWriter writer)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StringWriter stringWriter = new StringWriter();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;base.Render(htmlWriter);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string html = stringWriter.ToString();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int formStart = html.IndexOf(&amp;quot;&amp;lt;form&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int endForm = -1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (formStart &amp;gt;= 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endForm = html.IndexOf(&amp;quot;&amp;gt;&amp;quot;, formStart);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (endForm &amp;gt;= 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StringBuilder viewStateBuilder = new StringBuilder();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach (string element in aspNetFormElements)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int startPoint = html.IndexOf(&amp;quot;&amp;lt;input type=\&amp;quot;hidden\&amp;quot; name=\&amp;quot;&amp;quot; + element + &amp;quot;\&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (startPoint &amp;gt;= 0 &amp;amp;&amp;amp; startPoint &amp;gt; endForm)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int endPoint = html.IndexOf(&amp;quot;/&amp;gt;&amp;quot;, startPoint);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (endPoint &amp;gt;= 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endPoint += 2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string viewStateInput = html.Substring(startPoint, endPoint - startPoint);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Remove(startPoint, endPoint - startPoint);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Append(viewStateInput).Append(&amp;quot;\r\n&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (viewStateBuilder.Length &amp;gt; 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Insert(0, &amp;quot;\r\n&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Insert(endForm + 1, viewStateBuilder.ToString());&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;writer.Write(html);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8734332</link><pubDate>Tue, 15 Jul 2008 21:11:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8734332</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Alex,&lt;/p&gt;
&lt;p&gt;Thanks for doing that. &amp;nbsp;That is very useful.&lt;/p&gt;
</description></item><item><title>Fixing the Validation of viewstate MAC failed error issue.</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8850051</link><pubDate>Tue, 12 Aug 2008 09:44:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8850051</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;This is just a quickie to see if that helps anybody. The GridView in GeoTwitter had a problem as was&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8856617</link><pubDate>Wed, 13 Aug 2008 10:26:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8856617</guid><dc:creator>Clifford Champion</dc:creator><description>&lt;p&gt;I've introduced a purely javascript based approach that works well enough for me, and doesn't require you to setup your own string builder (which takes up some memory).&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ScriptManager.RegisterOnSubmitStatement(this, typeof(Page), &amp;quot;form disabler&amp;quot;,&lt;/p&gt;
&lt;p&gt;@&amp;quot;&lt;/p&gt;
&lt;p&gt;if(typeof(_PageReadyForSubmit) == 'undefined' || _PageReadyForSubmit!= true)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return false;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ScriptManager.RegisterStartupScript(this, typeof(Page), &amp;quot;form re-enabler&amp;quot;,&lt;/p&gt;
&lt;p&gt;@&amp;quot;&lt;/p&gt;
&lt;p&gt;_PageReadyForSubmit= true;&lt;/p&gt;
&lt;p&gt;&amp;quot;,&lt;/p&gt;
&lt;p&gt; true);&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8859493</link><pubDate>Wed, 13 Aug 2008 20:03:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8859493</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Clifford,&lt;/p&gt;
&lt;p&gt;Thanks for the additional workaround. &amp;nbsp;That is also a clean way to do it.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8870260</link><pubDate>Fri, 15 Aug 2008 20:46:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8870260</guid><dc:creator>Mike</dc:creator><description>&lt;P&gt;I had spent a lot of time on tracking down the __EVENTVALIDATION field rendered at end of page issue and finally got here to find the fix. I also noted while here that Studio and NET 3.5 SP1's had been &amp;nbsp;released so I updated.&lt;/P&gt;
&lt;P&gt;I go to test the __EVENTVALIDATION BasePage fix and find that my pages are rendering __EVENTVALIDATION much earlier than our QA and PROD servers. We had recently moved to using VS 2008 still compiling for NET 2 so am not sure where this issue is fixed but it appears to be so now.&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8895937</link><pubDate>Tue, 26 Aug 2008 06:30:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8895937</guid><dc:creator>Dustin Clark</dc:creator><description>&lt;p&gt;Beware of option 3 if you use Response.write anywhere in your code. &amp;nbsp;Anything you render using response.write will appear before the very top of your html, regardless of whether it's called from a .aspx file or from your codebehind. &amp;nbsp;Using the shortcut &amp;lt;%= %&amp;gt; fixes .aspx files (which i should have been using anyways), but I havent found a solution yet for using Response.Write in codebehind. &amp;nbsp;I think i'm going to decompile the .NET form class and override the actual rendering of these elements...which seems more efficient than substringing your entire HTML anyways. &amp;nbsp;I will post the solution if i can figure it out.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8904717</link><pubDate>Fri, 29 Aug 2008 12:42:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8904717</guid><dc:creator>Paul Saunders</dc:creator><description>&lt;p&gt;If you have any other form on the page, and are using the updated option 3, try changing the &lt;/p&gt;
&lt;p&gt;int formStart = html.IndexOf(&amp;quot;&amp;lt;form&amp;quot;); line to &lt;/p&gt;
&lt;p&gt;int formStart = html.IndexOf(&amp;quot;&amp;lt;form name=\&amp;quot;aspnetForm\&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;Also if you want this change to apply to all of your pages in your application, create a page adapter override the render emssage in there, as in option 3 update. Then add a browser file to the application, similar to the following:&lt;/p&gt;
&lt;p&gt;&amp;lt;browsers&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;browser refID=&amp;quot;Default&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;controlAdapters&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;adapter controlType=&amp;quot;System.Web.UI.Page&amp;quot;&lt;/p&gt;
&lt;p&gt;			 &amp;nbsp;adapterType=&amp;quot;MyPageAdapter&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;/controlAdapters&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;/browser&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/browsers&amp;gt;&lt;/p&gt;
&lt;p&gt;This will then apply indiscriminately to all pages in the application.&lt;/p&gt;
&lt;p&gt;Thanks for the work around by the way.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8919186</link><pubDate>Tue, 02 Sep 2008 09:33:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8919186</guid><dc:creator>J.</dc:creator><description>&lt;p&gt;This was a great help. &amp;nbsp;I used Alex's approach, but made one small change. &amp;nbsp;Instead of overriding Render:&lt;/p&gt;
&lt;p&gt; protected override void Render(HtmlTextWriter writer)&lt;/p&gt;
&lt;p&gt;I defined a method called RenderFormValidationEarly&lt;/p&gt;
&lt;p&gt; protected void RenderFormValidationEarly(HtmlTextWriter writer)&lt;/p&gt;
&lt;p&gt;Which I call from the pages that testing has shown suffer from this problem. &amp;nbsp;I'm very happy with it!&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8957320</link><pubDate>Thu, 18 Sep 2008 17:01:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8957320</guid><dc:creator>Aidas</dc:creator><description>&lt;p&gt;Hi, I was getting the same error till I used Alex's approach. &amp;nbsp;BUT!!! &lt;/p&gt;
&lt;p&gt;1. Now, the first line of a page is &amp;quot;\r\n\r\n\r\n&amp;quot; . What to do?&lt;/p&gt;
&lt;p&gt;2. When a user, after successfull submiting of data, clicks BACK in a Browser and after changing some leters repeats the SUBMIT, he gets &amp;quot;MAC...&amp;quot; ERROR :(&lt;/p&gt;
&lt;p&gt;ANY IDEAS?&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8966656</link><pubDate>Fri, 26 Sep 2008 18:56:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8966656</guid><dc:creator>ton</dc:creator><description>&lt;p&gt;I translated Alex's code to VB.NET for the great unwashed heathens who are not coding in C# :-)&lt;/p&gt;
&lt;p&gt;Imports Microsoft.VisualBasic&lt;/p&gt;
&lt;p&gt;Imports System.io&lt;/p&gt;
&lt;p&gt;Public Class BasePage&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Inherits Page&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Private Shared aspNetFormElements As String() _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;= {&amp;quot;__EVENTTARGET&amp;quot;, &amp;quot;__EVENTARGUMENT&amp;quot;, &amp;quot;__VIEWSTATE&amp;quot;, &amp;quot;__EVENTVALIDATION&amp;quot;, &amp;quot;__VIEWSTATEENCRYPTED&amp;quot;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim sw As StringWriter = New StringWriter()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim htmlWriter As HtmlTextWriter = New HtmlTextWriter(sw)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyBase.Render(htmlWriter)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim html As String = sw.ToString()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim formStart As Integer = html.IndexOf(&amp;quot;&amp;lt;form&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim endForm As Integer = -1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (formStart &amp;gt;= 0) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endForm = html.IndexOf(&amp;quot;&amp;gt;&amp;quot;, formStart)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (endForm &amp;gt;= 0) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim viewStateBuilder As StringBuilder = New StringBuilder()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For Each element As String In aspNetFormElements&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim startPoint As Integer = html.IndexOf(String.Format(&amp;quot;&amp;lt;input type='{0}' name='{1}'&amp;quot;, &amp;quot;hidden&amp;quot;, element))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If startPoint &amp;gt;= 0 AndAlso startPoint &amp;gt; endForm Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim endPoint As Integer = html.IndexOf(&amp;quot;/&amp;gt;&amp;quot;, startPoint)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (endPoint &amp;gt;= 0) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endPoint += 2&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim viewStateInput As String = html.Substring(startPoint, endPoint - startPoint)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Remove(startPoint, endPoint - startPoint)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Append(viewStateInput).Append(&amp;quot;\r\n&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Next&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (viewStateBuilder.Length &amp;gt; 0) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Insert(0, &amp;quot;\r\n&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Insert(endForm + 1, viewStateBuilder.ToString())&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;writer.Write(html)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Sub&lt;/p&gt;
&lt;p&gt;End Class&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8967227</link><pubDate>Sat, 27 Sep 2008 03:33:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8967227</guid><dc:creator>Naji</dc:creator><description>&lt;p&gt;i noticed when i used the VB code of solution number 3 that the render code doesn't find any of &amp;quot;__EVENTVALIDATION&amp;quot; and &amp;quot;__VIEWSTATEENCRYPTED&amp;quot; ... etc hiddien fields.&lt;/p&gt;
&lt;p&gt;while debugging the code i found that the problem resides in the following line:&lt;/p&gt;
&lt;p&gt;Dim startPoint As Integer = html.IndexOf(String.Format(&amp;quot;&amp;lt;input type='{0}' name='{1}'&amp;quot;, &amp;quot;hidden&amp;quot;, element))&lt;/p&gt;
&lt;p&gt;adding watch on that line i found the string produced is:&lt;/p&gt;
&lt;p&gt;&amp;lt;input type='hidden' name='__EVENTARGUMENT'&lt;/p&gt;
&lt;p&gt;the render method doesn't find this line in the produced html... because its:&lt;/p&gt;
&lt;p&gt;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;__EVENTTARGET&amp;quot; id=&amp;quot;__EVENTTARGET&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Notice the double quotations. &lt;/p&gt;
&lt;p&gt;to fix this problem replace that line of code with:&lt;/p&gt;
&lt;p&gt;Dim startPoint As Integer = html.IndexOf(String.Format(&amp;quot;&amp;lt;input type=&amp;quot;&amp;quot;{0}&amp;quot;&amp;quot; name=&amp;quot;&amp;quot;{1}&amp;quot;&amp;quot;&amp;quot;, &amp;quot;hidden&amp;quot;, element)) &lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8967235</link><pubDate>Sat, 27 Sep 2008 03:44:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8967235</guid><dc:creator>Naji</dc:creator><description>&lt;p&gt;Another thing i noticed in the converted code from C# to VB, is the existence of &amp;quot;\r\n&amp;quot;.&lt;/p&gt;
&lt;p&gt;which will produce the following hidden element replacement:&lt;/p&gt;
&lt;p&gt;\r\n&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;__EVENTVALIDATION&amp;quot;&lt;/p&gt;
&lt;p&gt;the solution is to replace the following code:&lt;/p&gt;
&lt;p&gt;viewStateBuilder.Append(viewStateInput).Append(&amp;quot;\r\n&amp;quot;)&lt;/p&gt;
&lt;p&gt;TO&lt;/p&gt;
&lt;p&gt;viewStateBuilder.Append(viewStateInput).Append(vbCrLf)&lt;/p&gt;
&lt;p&gt;AND FROM&lt;/p&gt;
&lt;p&gt;viewStateBuilder.Insert(0, &amp;quot;\r\n&amp;quot;)&lt;/p&gt;
&lt;p&gt;TO&lt;/p&gt;
&lt;p&gt;viewStateBuilder.Insert(0, vbCrLf)&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8970552</link><pubDate>Tue, 30 Sep 2008 21:04:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8970552</guid><dc:creator>ton</dc:creator><description>&lt;P&gt;Naji, good catches I sincerly apologize. It's just that I had loads of users bugging me about a fix and I was trying to get something out to them to shut them up. But haste always makes waste. I'm posting the revised code for those who need it. I changed all '\r\n" sequences to Environment.Newline's since its not as platform specific and added double quotes on the attribute fields.&lt;/P&gt;
&lt;P&gt;Imports Microsoft.VisualBasic&lt;/P&gt;
&lt;P&gt;Imports System.io&lt;/P&gt;
&lt;P&gt;Public Class BasePage&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Inherits Page&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Private Shared aspNetFormElements As String() _&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;= {"__EVENTTARGET", "__EVENTARGUMENT", "__VIEWSTATE", "__EVENTVALIDATION", "__VIEWSTATEENCRYPTED"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim sw As StringWriter = New StringWriter()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim htmlWriter As HtmlTextWriter = New HtmlTextWriter(sw)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyBase.Render(htmlWriter)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim html As String = sw.ToString()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim formStart As Integer = html.IndexOf("&amp;lt;form")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim endForm As Integer = -1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (formStart &amp;gt;= 0) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endForm = html.IndexOf("&amp;gt;", formStart)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (endForm &amp;gt;= 0) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim viewStateBuilder As StringBuilder = New StringBuilder()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For Each element As String In aspNetFormElements&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim startPoint As Integer = html.IndexOf(String.Format("&amp;lt;input type=""{0}"" name=""{1}""", "hidden", element))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If startPoint &amp;gt;= 0 AndAlso startPoint &amp;gt; endForm Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim endPoint As Integer = html.IndexOf("/&amp;gt;", startPoint)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (endPoint &amp;gt;= 0) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endPoint += 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim viewStateInput As String = html.Substring(startPoint, endPoint - startPoint)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Remove(startPoint, endPoint - startPoint)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Append(viewStateInput).Append(Environment.NewLine)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If (viewStateBuilder.Length &amp;gt; 0) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewStateBuilder.Insert(0, Environment.NewLine)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;html = html.Insert(endForm + 1, viewStateBuilder.ToString())&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;writer.Write(html)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;End Sub&lt;/P&gt;
&lt;P&gt;End Class&lt;/P&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8970568</link><pubDate>Tue, 30 Sep 2008 21:24:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8970568</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Has everyone tried .NET 3.5 SP1 to see if that resolves the issue for them? &amp;nbsp;That should take care of this problem without the need for any code workarounds.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8970588</link><pubDate>Tue, 30 Sep 2008 21:42:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8970588</guid><dc:creator>ton</dc:creator><description>&lt;p&gt;Tom from what I understand .NET 3.5 SP1 does solve this issue. &amp;nbsp;However, the economy is in the toilet at this point and my company isn't rushing to spend any money on technology upgrades. So unfortunately I'm stuck with .NET 2.0 for the time being. :-(&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8970606</link><pubDate>Tue, 30 Sep 2008 21:59:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8970606</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;ton,&lt;/p&gt;
&lt;p&gt;.NET 3.5 SP1 is a free download that includes .NET 2.0 SP2. &amp;nbsp;I understand if it is about testing and that knid of stuff with having the new version. &amp;nbsp;But there isn't a cost from us for getting this.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8970616</link><pubDate>Tue, 30 Sep 2008 22:08:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8970616</guid><dc:creator>ton</dc:creator><description>&lt;p&gt;Ok so .NET 2.0 SP2 specifically fixes this? Crap I didn't know. Thanks Tom.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8996638</link><pubDate>Sun, 12 Oct 2008 15:25:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8996638</guid><dc:creator>Smcoxon</dc:creator><description>&lt;p&gt;Hi, I tried the VB versions of this code above. Unfortunately it didn’t quite work for me. I use master pages with a menu based on the. &amp;nbsp;Using this BasePage approach stops the Menu Friendly Adapter menu from working. Also, in the aspx mark up in the footer of my master page I have: &lt;/p&gt;
&lt;p&gt;&amp;lt;div&amp;gt; &lt;/p&gt;
&lt;p&gt;Copyright &amp;#169; 2006 - &amp;lt;%Response.Write(Year(Now()))%&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;When using the BasePage the year now gets written at the top of the page instead of in the footer area. Any ideas on how to fix?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Smcoxon&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#8996646</link><pubDate>Sun, 12 Oct 2008 16:06:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8996646</guid><dc:creator>Smcoxon</dc:creator><description>&lt;p&gt;I think I’ve resolved my issue…&lt;/p&gt;
&lt;p&gt;I removed the entire mark up in my master page footer &amp;lt;div&amp;gt; and used the master Page Init event to write the text and date in to the footer &amp;lt;div&amp;gt; innerHtml. This seems to work as the year string is no longer written to the top of the page using my original aspx mark up: &amp;lt;% Response.Write(Year(Now()) %&amp;gt;. The Friendly Menu Adapter is also working again by doing this.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Smcoxon&lt;/p&gt;
&lt;p&gt;PS. Any news on when a working 3.5 SP1 will be released? &amp;nbsp;There seems to be too many reported issues with the beta version to chance installing it.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9010916</link><pubDate>Wed, 22 Oct 2008 12:31:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9010916</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Can anyone give me 'THE' accepted solution for this problem?&lt;/p&gt;
&lt;p&gt;My problem seems to be related to the fact that I have quite a large wizard control which has 1 user control embedded within each wizard step. One of the wizard steps has a user control with a gridView inside. The gridview also uses the DataKeys feature and I think this is causing the problem.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9033557</link><pubDate>Mon, 03 Nov 2008 18:36:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9033557</guid><dc:creator>Zandro</dc:creator><description>&lt;p&gt;I keep getting the same error. But I was able to solve it. But we have another page that works practically it has the same output and design and it works the different was this.&lt;/p&gt;
&lt;p&gt;We had this the .ASPX page.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;form name=&amp;quot;form1&amp;quot; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;id=&amp;quot;form1&amp;quot; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&amp;quot;server&amp;quot; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;action=&amp;quot;XXXXXXX.aspx&amp;quot; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;method=&amp;quot;post&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;and replaced it with this.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;form name=&amp;quot;form1&amp;quot; &amp;nbsp;runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;After making those changes, works like a charm.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9159392</link><pubDate>Mon, 01 Dec 2008 06:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9159392</guid><dc:creator>Steve Kozyk</dc:creator><description>&lt;p&gt; &amp;nbsp; &amp;nbsp;I found the current thread we are all reading on www.asp.net while I was searching for a problem with my membership and role providers. &amp;nbsp;I kept getting the following error: &amp;quot;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. Auto Generate cannot be used in a cluster.&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;The problem was my login system worked fine on my local machine, but when I FTPed my application to my remote server and then launched it, the user names and roles I created locally would not authenticate. &amp;nbsp;Login would fail for these users. &amp;nbsp;If I then created new users with my application on my remote server they would authenticate properly. &amp;nbsp;In short, any time I moved my application to a new directory the users and roles created when the application resided in previous directories failed.&lt;/p&gt;
&lt;p&gt;I found a solution to the problem that worked for me. &amp;nbsp;The solution is to manually add the applicationName attribute to the &amp;lt;providers&amp;gt; node of your web.config file and give it a value, such as &amp;quot;/&amp;quot;. &amp;nbsp;I wrote a short article about the process I used to fix the problem. &amp;nbsp;Hope it helps:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.itegritygroup.com/itegrity/seo-web-development-blog/index.php/2008/10/validation-viewstate-mac-failed/"&gt;http://www.itegritygroup.com/itegrity/seo-web-development-blog/index.php/2008/10/validation-viewstate-mac-failed/&lt;/a&gt; &lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9160470</link><pubDate>Mon, 01 Dec 2008 16:53:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9160470</guid><dc:creator>Derek Hosewood</dc:creator><description>&lt;p&gt;Great article. this was exactly the problem i was having with my site &amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.wordbricks.com&amp;quot;"&gt;http://www.wordbricks.com&amp;quot;&lt;/a&gt; /&amp;gt; ie when people try to add things to the basket before the page has finished loads completely.&lt;/p&gt;
&lt;p&gt;Thanks again. &lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9169165</link><pubDate>Wed, 03 Dec 2008 12:36:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9169165</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Need to use fixed keys to encrypt/decrypt viewstate to avoid postback issues, whether its after long periods or after application pool is recycled. &amp;nbsp;I found this website for generating these keys for either macnine.config or web.config &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://www.orcsweb.com/articles/aspnetmachinekey.aspx"&gt;http://www.orcsweb.com/articles/aspnetmachinekey.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9181828</link><pubDate>Sun, 07 Dec 2008 13:41:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9181828</guid><dc:creator>Baskar rao</dc:creator><description>&lt;p&gt;Hi all... Nice post. Whether the upgradation to .NET 3.5 or .NET 2.0 SP2 fixes these issues.......&lt;/p&gt;
&lt;p&gt;We here are sick of these viewstate. Our local environment does not get these errors where as these appear to occur in the Prod Servers. &lt;/p&gt;
&lt;p&gt;All the workarounds like keeping same machine key in NLB Servers, and then the workarounds suggested above are applied. &lt;/p&gt;
&lt;p&gt;The only difference is in local we have no firewall where as in Prod there is a Firewall.....&lt;/p&gt;
&lt;p&gt;So what type of settings needs to be addressed in the firewall to allow optimum size of Viewstate...&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9182980</link><pubDate>Mon, 08 Dec 2008 03:58:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9182980</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Baskar,&lt;/p&gt;
&lt;p&gt;How large of a viewstate are you using? &amp;nbsp;There isn't really a good size to tell you other then to check what your viewstates are. &amp;nbsp;You can try disabling viewstate if it is 2.0 and just use controlstate.&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9249622</link><pubDate>Tue, 23 Dec 2008 12:30:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9249622</guid><dc:creator>Henry</dc:creator><description>&lt;p&gt;We had issues with __EVENTVALIDATION not being sent with long pages and users doing postbacks prior to page being fully rendered. Installing 2.0 SP2 via 3.5 SP1 seems to have solved it. Thanks for the heads up.&lt;/p&gt;
&lt;p&gt;Maybe the original article should be updated, though. The listed workarounds seem too much of a hassle now.&lt;/p&gt;</description></item><item><title>ViewState validation troubles?</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9250998</link><pubDate>Wed, 24 Dec 2008 01:06:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9250998</guid><dc:creator>Never doubt thy debugger</dc:creator><description>&lt;p&gt;If you work with web sites in a complex/multi server environment you might be familiar with this error&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9269730</link><pubDate>Sat, 03 Jan 2009 00:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9269730</guid><dc:creator>SRK</dc:creator><description>&lt;p&gt;In 2008 also i am not able to solve this issue.... can u suggest me another way to solve this ???&lt;/p&gt;
&lt;p&gt;Plz mail me your suggestions at : hallowbestboy@gmail.com&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9303231</link><pubDate>Sat, 10 Jan 2009 05:11:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9303231</guid><dc:creator>rohit</dc:creator><description>&lt;p&gt;I am having the same problem. Our system has been in production for about a year, we never had this problem before. Since a week we are getting the following error.&lt;/p&gt;
&lt;p&gt;System.Web.HttpException: The state information is invalid for this page and might be corrupted. ---&amp;gt; System.Web.UI.ViewStateException: Invalid viewstate&lt;/p&gt;
&lt;p&gt;User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SV1; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.2) &lt;/p&gt;
&lt;p&gt;ViewState: /wEPDwUKLTg2NjM2NTk1OQ8WBB4JX3BhZ2VNb2RlCylqQVcwM DAwMjguQ3JlZGl0LkNyZWRpdEVkaXQrUGFnZU1vZGVWYWx1ZXMs IEFXMDAwMDI4LCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV 1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAAeF19yZWdpc3Rlcm VkQ2xpZW50RXZlbnRzMvQHAAEAAAD/////AQAAAAAAAAAMAgAAA ElTeXN0ZW0sIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0 cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQE AAAAyU3lzdGVtLkNvbGxlY3Rpb25zLlNwZWNpYWxpemVkLk5hbW VWYWx1ZUNvbGxlY3Rpb24HAAAACFJlYWRPbmx5DEhhc2hQcm92a WRlcghDb21wYXJlcgVDb3VudARLZXlzBlZhbHVlcwdWZXJzaW9u AAMDAAYFAAEyU3lzdGVtLkNvbGxlY3Rpb25zLkNhc2VJbnNlbnN pdGl2ZUhhc2hDb2RlUHJvdmlkZXIqU3lzdGVtLkNvbGxlY3Rpb2 5zLkNhc2VJbnNlbnNpdGl2ZUNvbXBhcmVyCAgCAAAAAAkDAAAAC QQAAAACAAAACQUAAAAJBgAAAAMAAAAEAwAAADJTeXN0ZW0uQ29s bGVjdGlvbnMuQ2FzZUluc2Vuc2l0aXZlSGFzaENvZGVQcm92aWR lcgEAAAAGbV90ZXh0Ax1TeXN0ZW0uR2xvYmFs... ---&amp;gt; System.FormatException: Invalid length for a Base-64 char array. &lt;/p&gt;
&lt;p&gt;at System.Convert.FromBase64String(String s) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.ObjectStateFormatter.Deserialize(St ring inputString) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.ObjectStateFormatter.System.Web.UI. IStateFormatter.Deserialize(String serializedState) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Util.DeserializeWithAssert(IStateFo rmatter formatter, String serializedState) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.HiddenFieldPageStatePersister.Load( ) &lt;/p&gt;
&lt;p&gt;--- End of inner exception stack trace --- &lt;/p&gt;
&lt;p&gt;--- End of inner exception stack trace --- &lt;/p&gt;
&lt;p&gt;at System.Web.UI.ViewStateException.ThrowError(Excep tion inner, String persistedState, String errorPageMessage, Boolean macValidationError) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.HiddenFieldPageStatePersister.Load( ) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.LoadPageStateFromPersistenceMe dium() &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.LoadAllState() &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.ProcessRequest() &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.ProcessRequestWithNoAssert(Htt pContext context) &lt;/p&gt;
&lt;p&gt;at System.Web.UI.Page.ProcessRequest(HttpContext context) &lt;/p&gt;
&lt;p&gt;at ASP.credit_creditedit_aspx.ProcessRequest(HttpCon text context) &lt;/p&gt;
&lt;p&gt;at System.Web.HttpApplication.CallHandlerExecutionSt ep.System.Web.HttpApplication.IExecutionStep.Execut e() &lt;/p&gt;
&lt;p&gt;at System.Web.HttpApplication.ExecuteStep(IExecution Step step, Boolean&amp;amp; completedSynchronously) Category: PageError Priority: 5 EventId: 100 Severity&lt;/p&gt;
&lt;p&gt;We are not using a web farm. Our environment is windows 2003 .net 2.0 &lt;/p&gt;
&lt;p&gt;The production environment works fine but our SQA system is giving errors.&lt;/p&gt;
&lt;p&gt;Any help is appreciated.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9304772</link><pubDate>Sun, 11 Jan 2009 01:02:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9304772</guid><dc:creator>Dustin Clark</dc:creator><description>&lt;p&gt;I'm still getting this error after installing .NET Framework 3.5, SP1. &amp;nbsp;In fact, it seems that it is happening more frequently. &amp;nbsp;However, I can see in the HTML souce that the __EVENTVALIDATION input has moved up to where the other .NET hidden inputs are. &amp;nbsp;The interesting thing is that now I only get the &amp;quot;Validation of viewstate MAC failed&amp;quot; error, whereas I previously received all three errors mentioned above.&lt;/p&gt;
&lt;p&gt;My theory is that this is happens when a postback is triggered after a session has expired, meaning the postback is the first request of the session. &amp;nbsp;This can probably happen one of two ways: 1) User sits on a page without doing anything until the session expires, then clicks a button. 2) Client's browser has cached the HTML from a previous session, so the user views the web page again without initiating a session on the server. &amp;nbsp;I'm guessing that #2 is more common.&lt;/p&gt;
&lt;p&gt;I know this is happening from looking at click trails. &amp;nbsp;When the error occurs, the first request of the session is a POST.&lt;/p&gt;
&lt;p&gt;So, I'm going to add the following line of code in my base page:&lt;/p&gt;
&lt;p&gt;Response.Cache.SetNoStore()&lt;/p&gt;
&lt;p&gt;I'm doing this already on pages that require session context. &amp;nbsp;I'll do it all all pages and we'll see what happens.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9308670</link><pubDate>Mon, 12 Jan 2009 21:17:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9308670</guid><dc:creator>mike</dc:creator><description>&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: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9415362</link><pubDate>Thu, 12 Feb 2009 21:26:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9415362</guid><dc:creator>Pierre Carter</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I had the same problem with the Web application installed in IIS 5.1 on Windows XP. &amp;nbsp;I don't know if the following text will solve your problem but it solved mine.&lt;/p&gt;
&lt;p&gt;The problem came out only after the machine was updated with the .NET framework 3.5.&lt;/p&gt;
&lt;p&gt;After reading this article 2 or 3 times and after I tried the solutions in the article (did not solve my problem), I discovered, in the problematic Web page, an old attribute in the tag &amp;quot;form&amp;quot;. &amp;nbsp;I had the following in the tag:&lt;/p&gt;
&lt;p&gt;&amp;lt;form id=&amp;quot;myForm&amp;quot; runat=&amp;quot;server&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;myForm2.aspx&amp;quot; &amp;gt;&lt;/p&gt;
&lt;p&gt;I just removed the attribute &amp;quot;action&amp;quot; and everything works fine since.&lt;/p&gt;
&lt;p&gt;Hope it helps!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9429787</link><pubDate>Wed, 18 Feb 2009 07:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9429787</guid><dc:creator>Sam</dc:creator><description>&lt;p&gt;I am having this error on serveral sites. As usual it appears to be quite random and I've never been able to reproduce it consistently. It's not related to timing either as I have left pages sitting for five minutes, come back and hit a button and received this error. I get this error even though I have disabled viewstate validation!&lt;/p&gt;
&lt;p&gt;Someone at MS needs to pull their forearm out of their backside and do some proper research into this and get it fixed.&lt;/p&gt;
&lt;p&gt;I'm trying out option 3. I'm skeptical, but I'll see how it goes and report back if I stop seeing the error.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9430149</link><pubDate>Wed, 18 Feb 2009 09:38:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9430149</guid><dc:creator>Sam Critchley</dc:creator><description>&lt;p&gt;Option 3 didn't make any difference. However, something the client said about leaving the page open for a while and returning later to click on a link was triggering the error.&lt;/p&gt;
&lt;p&gt;So I have disabled session state (nvr use the thing) and I'll see if that works out.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9527547</link><pubDate>Wed, 01 Apr 2009 21:36:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9527547</guid><dc:creator>Apps</dc:creator><description>&lt;p&gt;I insatlled the .NET 3.5 SP1 (.NET 2.0 SP2) from the above source. Still the error persistes. &lt;/p&gt;
&lt;p&gt;I have no luck in resolving this error&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9528312</link><pubDate>Thu, 02 Apr 2009 04:28:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9528312</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Apps,&lt;/p&gt;
&lt;p&gt;Do you know what the situation is around when you get the error? &amp;nbsp;Can you repro it?&lt;/p&gt;
&lt;p&gt;Have any of the other workarounds helped?&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9535877</link><pubDate>Tue, 07 Apr 2009 16:02:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9535877</guid><dc:creator>Alexis</dc:creator><description>&lt;p&gt;How do I use Alex Class in a project?&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9538052</link><pubDate>Wed, 08 Apr 2009 15:11:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9538052</guid><dc:creator>J. Hellborg</dc:creator><description>&lt;p&gt;Using a load testing tool, I can reproduce it by changing the Web Garden figure to &amp;gt; 1. The higher the wg figure the more Viewstate errors my load test will generate ( though the overall number is small, around 1% of completed tests )&lt;/p&gt;
&lt;p&gt;1 wg = 1 w3wp.exe process&lt;/p&gt;
&lt;p&gt;2 wg = 2 w3wp.exe processes&lt;/p&gt;
&lt;p&gt;I'm guessing something gets mixed up with the wrong thread handling the another threads request, occasionally.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9566521</link><pubDate>Fri, 24 Apr 2009 14:03:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9566521</guid><dc:creator>Nicolas</dc:creator><description>&lt;p&gt;For those who need ASP.NET machine keys and French explanations, I wrote a simple generator you can find on my personal web site &lt;a rel="nofollow" target="_new" href="http://muniere.fr/Projects/KeysGenerator/"&gt;http://muniere.fr/Projects/KeysGenerator/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope it helps!&lt;/p&gt;
&lt;p&gt;Nico&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9616370</link><pubDate>Thu, 14 May 2009 18:51:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9616370</guid><dc:creator>Doug</dc:creator><description>&lt;p&gt;I'm as well getting this error, mostly on the test server. It happens unpredictablely.&lt;/p&gt;
&lt;p&gt;My question is, can someone cause the error simply? Then it would be much easier to test these solutions. &lt;/p&gt;
&lt;p&gt;Basically, our app will timeout, and the login page, usually after sitting un-used for long periods of time will throw the error. Its occurred in localhost a handful of times. &lt;/p&gt;
&lt;p&gt;It would be nice to know if the error can be triggered easily, so I don't have to wait for app timeouts to fire, session timeouts to end. Maybe there is not a simple way, but just thought i would ask?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9617210</link><pubDate>Fri, 15 May 2009 01:23:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9617210</guid><dc:creator>Donnie Wishard</dc:creator><description>&lt;p&gt;I had this issue and found the cause to be the following. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I had a GridView with ButtonFields, and a Form. &amp;nbsp; The form action was set to post to page &amp;quot;X&amp;quot;. &amp;nbsp;Later in my code, I caught the Selected Changed event of the GridView when the ButtonField was clicked or &amp;quot;Selected&amp;quot;. &amp;nbsp;At that point I did a Server.Transfer to page X with the a data value in the row selected. &amp;nbsp;Basically when they selected a row in the grid i sent them to a details page of that row. &amp;nbsp;Turns out, I needed to remove the &amp;quot;action&amp;quot; from the form, and then it worked fine with no issues. &amp;nbsp;My environment is Windows Server 2003, .Net 2.0 &lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9635091</link><pubDate>Fri, 22 May 2009 14:59:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9635091</guid><dc:creator>Jerome</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;i have the same error but only on a web server under win 2008 et IIS 7, under IIS6 and win 2003 or from my development server (visual studio webserver) to the win 2008 server, there is no problem. &lt;/p&gt;
&lt;p&gt;I explained my configuration : i have two web sites on my server, ws1 and ws2. The site ws2 try to send values to ws1 by posting them with an asp:linkbutton and the postbackurl property defines to ws1, &lt;a rel="nofollow" target="_new" href="http://ws1/default.aspx"&gt;http://ws1/default.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can contact me with my email publicNOSPAM@NOSPAM.bfd.fr . (Don't forget to remove NOSPAM).&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9737046</link><pubDate>Fri, 12 Jun 2009 21:27:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9737046</guid><dc:creator>Thom</dc:creator><description>&lt;p&gt;In my case, this error was caused by hitting a site memory cap instituted by my web hosting company. &amp;nbsp;They increased my limit and it went away.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9793942</link><pubDate>Sat, 20 Jun 2009 21:57:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9793942</guid><dc:creator>slayton</dc:creator><description>&lt;p&gt;Hi. &amp;nbsp;This is great information, thank you! &amp;nbsp;I also encountered this exact issue and error message in the large web app that I program and support and uses .NET. &amp;nbsp;Interestingly (or maybe not, I didn't ready every comment). &amp;nbsp; &lt;/p&gt;
&lt;p&gt;It seems though my experience of resolving the issue went like this. &amp;nbsp;My issue kept coming back whenever I upgrade to .NET 2.0 SP2. &amp;nbsp;If I installed any .NET package 2.0 SP2 or 3.0 and 3.5 that took .NET 2.0 to SP2, my page would break. &amp;nbsp;And I got all kinds of results installing different packages. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to work this whole mess out, I started with uninstalling all .NET versions &amp;gt; 1.0. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then installed 2.0.50727.42. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;gt; the page worked&lt;/p&gt;
&lt;p&gt;Then installed when I started installing .NET 3.0 and 3.5, it included updates on .NET 2.0 that took it to SP2. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;gt; page wouldn't work&lt;/p&gt;
&lt;p&gt;I did a bunch of tests (unistalling/reinstalling all .NET versions) with a variety of 2.0, 3.0 and 3.5 packages available if any of them took .NET 2.0 to 2.0.50727.3053 or upward to 2.0.50727.3082 the page would not work. &amp;nbsp;However, there was ONE exception of having the page work when .NET 2.0.50727.3053 was installed via 3.0 SP1 which also installed 3.0.4506.2152. &amp;nbsp;Although, it seems I was not able to repeat that result. &amp;nbsp;So I will stick by what I am saying about 2...3053 for now.&lt;/p&gt;
&lt;p&gt;The bottom line &amp;nbsp;was that I was able to get .NET frameworks for 2.0, 3.0 and 3.5 that kept my page working by installing .NET 3.5 (NOTE: NO SERVICE PACK). &amp;nbsp;This installed &lt;/p&gt;
&lt;p&gt;.NET 2.0.00050727.1433&lt;/p&gt;
&lt;p&gt;.NET 3.0.4506.648&lt;/p&gt;
&lt;p&gt;and .NET 3.5.????? (not sure of the rest of the version)&lt;/p&gt;
&lt;p&gt;Does any of this make sense? &amp;nbsp;Anyone else encounter this? or perhaps unknowningly you got a visit from the Windows blind link fairy and installed packages that was not full .NET 2.0 SP2.&lt;/p&gt;
&lt;p&gt;By the way, here is a neat little app that allowed me to get deep into version numbers. &amp;nbsp;It isn't updated for 3.5 yet but I imagine it will be soon....&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.tmgdevelopment.co.uk/versioncheck.htm"&gt;http://www.tmgdevelopment.co.uk/versioncheck.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I will check back for thoughts or questions on this whole version experiement...know that the results above are greatly summarized.&lt;/p&gt;
&lt;p&gt;Slayton&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9793943</link><pubDate>Sat, 20 Jun 2009 22:09:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9793943</guid><dc:creator>Slayton</dc:creator><description>&lt;p&gt;I should also mention the work I did was on W2k3 SP2 and IIS6.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9799282</link><pubDate>Tue, 23 Jun 2009 14:54:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9799282</guid><dc:creator>Chan Kok Kiet</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I hit this error only if I implemented server side viewstate to my web app, and have callback.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9823723</link><pubDate>Wed, 08 Jul 2009 14:49:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9823723</guid><dc:creator>Tim</dc:creator><description>&lt;p&gt;Just wanted to comment. &amp;nbsp;We are using .NET 3.5 SP1 (which mean .NET 2.0 SP2) and we have a &amp;quot;fixed&amp;quot; MachineKey setting. &amp;nbsp;This issue is STILL happening. &amp;nbsp;So I will look at some of these resolutions and try to come up with something that works.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9837661</link><pubDate>Fri, 17 Jul 2009 20:26:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9837661</guid><dc:creator>Greg</dc:creator><description>&lt;p&gt;Excellent post!! &lt;/p&gt;
&lt;p&gt;2 days spent looking for the reason for this untill I spotted that the __EventValidation is missing altogether!&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9838050</link><pubDate>Sat, 18 Jul 2009 03:17:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9838050</guid><dc:creator>molotov</dc:creator><description>&lt;p&gt;FIX: Error message on an ASP.NET page after you submit a form that has the &amp;quot;action&amp;quot; attribute defined after you install the .NET Framework 2.0 SP2 or the .NET Framework 3.5 SP1: &amp;quot;Validation of viewstate MAC failed&amp;quot; @ &lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/970459"&gt;http://support.microsoft.com/kb/970459&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9841184</link><pubDate>Mon, 20 Jul 2009 11:53:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9841184</guid><dc:creator>René</dc:creator><description>&lt;p&gt;About WorkAround 3, the C# BasePage class, how do you inherit this page, when I put in behind Inherits in my .aspx file, I get an error saying it needs a different Model.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9850821</link><pubDate>Tue, 28 Jul 2009 12:11:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9850821</guid><dc:creator>Vishal</dc:creator><description>&lt;p&gt;I am still getting this Error, I have .net 2.0 with SP 2.&lt;/p&gt;
&lt;p&gt;Error: &lt;/p&gt;
&lt;p&gt;System.Web.HttpException was unhandled by user code&lt;/p&gt;
&lt;p&gt; &amp;nbsp;ErrorCode=-2147467259&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Message=&amp;quot;Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &amp;lt;machineKey&amp;gt; configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Source=&amp;quot;System.Web&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;StackTrace:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.HiddenFieldPageStatePersister.Load()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at CTL.COM.PRIME.WebApplications.Common.PageBase.LoadPageStateFromPersistenceMedium() in C:\Projects\WebApplications\Common\Modules\PageX.vb:line 331&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.Page.LoadAllState()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9851342</link><pubDate>Tue, 28 Jul 2009 23:29:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9851342</guid><dc:creator>Anita</dc:creator><description>&lt;p&gt;I tried Basepage third Solution but still it showing error , any idea to fix it?&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9851553</link><pubDate>Wed, 29 Jul 2009 03:20:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9851553</guid><dc:creator>Patrick</dc:creator><description>&lt;p&gt;Has anyone seen a different solution? &amp;nbsp;I've tried just about everything I can on this page and nothing works.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9857007</link><pubDate>Tue, 04 Aug 2009 13:37:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9857007</guid><dc:creator>patibandha</dc:creator><description>&lt;p&gt;we are getting this error in Chrome only.. &lt;/p&gt;
&lt;p&gt;in IE and other it is working fine. but only on chrome if i use history back btn then i execute the page.. it is giving me this error.. &lt;/p&gt;
&lt;p&gt;Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &amp;lt;machineKey&amp;gt; configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.&lt;/p&gt;
&lt;p&gt;as i read many problems related to this.. but they are not Chrome related.&lt;/p&gt;
&lt;p&gt;any idea.. &lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9885702</link><pubDate>Wed, 26 Aug 2009 21:17:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9885702</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Actually, we're not using a farm server, we're not using anything that uses DataKeyNames (or anything that databinds for that matter), and the page is fairly small, but this error will come up after the webpage has been left open for quite some time, and the user attempts to make a postback.&lt;/p&gt;
&lt;p&gt;Anyone got some ideas?&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9892124</link><pubDate>Mon, 07 Sep 2009 10:36:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9892124</guid><dc:creator>Wendell</dc:creator><description>&lt;p&gt;Everything that was posted here did not solved the issue. In our DEV machine it was working fine. But in our PRD servers. it was not working same issues that you reported. Has this something to do with Firewalls? Maybe we're fixing here that was not the main issue at all? any ideas? updates?&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9892269</link><pubDate>Mon, 07 Sep 2009 19:17:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9892269</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;One thing you can do is use one of the available ViewState Decoders to look at the ViewState and see what it looks like. &amp;nbsp;The main thing to look for is if it is getting cut off. &amp;nbsp;You can find a couple of decoders on Scott's blog at:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/scottgu/archive/2003/02/16/2495.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2003/02/16/2495.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9895510</link><pubDate>Tue, 15 Sep 2009 21:07:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895510</guid><dc:creator>Tony</dc:creator><description>&lt;p&gt;Re: Ron's comment - I have exactly the same issue - if the page is left open for some time, then I click a link to open a popup and perform a callback to rebind some data, I'll get the viewstate error everytime. &amp;nbsp;Seems to be linked to the session timeout. &amp;nbsp;Out of options now!&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9895520</link><pubDate>Tue, 15 Sep 2009 21:26:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895520</guid><dc:creator>Jandler</dc:creator><description>&lt;p&gt;Unfortunately, the issue still occurred for me. I installed the latest SP and when I run the app through VS2008 and perform the clicking, the error still persist.&lt;/p&gt;</description></item><item><title>re: Validation of viewstate MAC failed error</title><link>http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx#9919473</link><pubDate>Mon, 09 Nov 2009 11:11:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9919473</guid><dc:creator>arun</dc:creator><description>&lt;p&gt;i am inheriting my page from BasePage&lt;/p&gt;
&lt;p&gt;but still i am getting this error then what may be the cause for it ?&lt;/p&gt;
&lt;p&gt;plz mail me at aruninnice@gmail.com&lt;/p&gt;</description></item></channel></rss>