Proxy server truncating View State

2020-03-31 06:41发布

Is there any way I can simulate a proxy server truncating a viewstate?

2条回答
ら.Afraid
2楼-- · 2020-03-31 07:32

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:

http://www.fiddlertool.com/

查看更多
混吃等死
3楼-- · 2020-03-31 07:38

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();
查看更多
登录 后发表回答