Move ViewState server-side
<p>Okay so I have an ASP.NET application and I'm trying to reduce the overhead for our pages (our users have PCs that average 10 years old).</p>

<p>One of the approaches is to move ViewState server-side. We've plenty of RAM.</p>

<p>I followed the most often cited pattern for doing this here: <a href="http://authors.aspalliance.com/robertb/articles.aspx?articleId=2" rel="nofollow">http://authors.aspalliance.com/robertb/articles.aspx?articleId=2</a></p>

<p>Because it was written 7 years ago, I had to update some obsolete functions, namely RegisterHiddenField to ScriptManager.RegisterHiddenField and ConfigurationSettings.AppSettings to ConfigurationManager.AppSettings.</p>

<p>This seems to work fairly well, however as soon as I do an AJAX postback, I get the error</p>

<pre><code>Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The state information is invalid for this page and might be corrupted.
</code></pre>

<p>I also noticed that there are now two hidden "__VIEWSTATE" fields on each page with one of them being empty, and one of them having the numeric value from my class.  I think this is related to the issue -- perhaps the AJAX update is trying to reading from the empty one instead of the one with the value?</p>

<p>Does anyone know why this error occurs?</p>
