Is there any way I can simulate a proxy server truncating a viewstate?
+1
A:
How have you ascertained it is a proxy server? It doesn't sound likely that a proxy server would truncate parts of the HTML.
However, if ViewState is interfered with then ASP.NET will throw an Invalid Viewstate exception. So, erm,
throw new System.Web.UI.ViewStateException();
Dan Diplo
2009-07-29 14:57:42
http://support.microsoft.com/kb/555353 - Intermittent Invalid Viewstate Error in ASP.NET Web pages
Miyagi Coder
2009-07-29 15:00:50
+2
A:
I avoid ViewState client-side entirely by putting it server-side. The code is about 5 lines long and I've seen a tremendous improvement in performance.
http://aspadvice.com/blogs/robertb/archive/2005/11/16/13835.aspx
You could fake a tampered viewstate easily using fiddler:
Nissan Fan
2009-07-29 15:42:53
There's also a good article on CodeProject about using the Provider model to store ViewState in a database:http://www.codeproject.com/KB/viewstate/ViewStateProvider.aspx
Dan Diplo
2009-07-29 15:50:09