Discussion:
ViewState, Firewalls, and MaxPageStateFieldLength
Nick Simpson
2007-05-10 14:24:51 UTC
Permalink
Hi There,

A very small number of the users on our web sites (using .NET 1.1 or .NET
2.0) complain that the sites hang for them when they click buttons/links
that trigger postbacks. Some of these buttons are LinkButtons, some are
ImageButtons, some use Javascript, some do not. They are all unusable.

When i first heard about this i created some basic tests on our site to
check that HTTP POSTs were working in general for these users and they are.
In fact basic Web Forms outside of the context of our normal pages work
fine. Both LinkButtons and ImageButtons trigger successful postbacks
without hanging.

One of the main things that distinguishes these pages is the size of the
ViewState. The postbacks that worked had very small ViewState - approx. 50
characters. Our homepage on the other hand ViewState accounts for 20K of
the 80K file size.

I hear some firewalls can block HTTP POSTs with large ViewState so i have
cut down the size of our ViewState and also used the
MaxPageStateFieldLength setting in web.config.

Has anyone out there had Firewall issues with ViewState? Is there any
bullet proof way of ensuring firewalls don't block it short of not using it?

Also does anyone else have experience of using MaxPageStateFieldLength? It
seems to have the unfortunate side effect for us of producing a small but
steady trickle of ViewState errors with error messages like "Invalid
viewstate: Missing field: __VIEWSTATE589.".

Any help appreciated,

Nick

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Nick Simpson
2007-05-10 16:16:35 UTC
Permalink
Further to this, with MaxPageStateFieldLength enabled we have had about 200
ViewState errors over the last hour or so, and some of our Telerik Ajax
controls slowed down massively sometimes crashing the browser - they are
normally really fast. No doubt this was because some of our pages now had
hundreds of hidden form fields across which the ViewState was split - seems
this can, in our case at least, be a performance killer. Needless to say,
this feature is no longer on our site. Any views?

On Thu, 10 May 2007 10:24:51 -0400, Nick Simpson
<***@MUSICSALES.CO.UK> wrote:

>Hi There,
>
>A very small number of the users on our web sites (using .NET 1.1 or .NET
>2.0) complain that the sites hang for them when they click buttons/links
>that trigger postbacks. Some of these buttons are LinkButtons, some are
>ImageButtons, some use Javascript, some do not. They are all unusable.
>
>When i first heard about this i created some basic tests on our site to
>check that HTTP POSTs were working in general for these users and they are.
>In fact basic Web Forms outside of the context of our normal pages work
>fine. Both LinkButtons and ImageButtons trigger successful postbacks
>without hanging.
>
>One of the main things that distinguishes these pages is the size of the
>ViewState. The postbacks that worked had very small ViewState - approx. 50
>characters. Our homepage on the other hand ViewState accounts for 20K of
>the 80K file size.
>
>I hear some firewalls can block HTTP POSTs with large ViewState so i have
>cut down the size of our ViewState and also used the
>MaxPageStateFieldLength setting in web.config.
>
>Has anyone out there had Firewall issues with ViewState? Is there any
>bullet proof way of ensuring firewalls don't block it short of not using
it?
>
>Also does anyone else have experience of using MaxPageStateFieldLength? It
>seems to have the unfortunate side effect for us of producing a small but
>steady trickle of ViewState errors with error messages like "Invalid
>viewstate: Missing field: __VIEWSTATE589.".
>
>Any help appreciated,
>
>Nick
>
>===================================
>This list is hosted by DevelopMentor® http://www.develop.com
>
>View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Kucera
2007-05-10 17:44:15 UTC
Permalink
Marc Brooks
2007-05-11 02:10:11 UTC
Permalink
> One of the main things that distinguishes these pages is the size of the
> ViewState. The postbacks that worked had very small ViewState - approx. 50
> characters. Our homepage on the other hand ViewState accounts for 20K of
> the 80K file size.

I reported an issue with Norton's antivirus software a couple years
ago with large ViewState getting dropped, truncated, and even FREEZING
the firewall built into NAV. I opened a case, and I've never seen a
fix issued, so that might be what's biting you.

That said, you should use server-side ViewState storage AND cut down
on the amount of ViewState you are using. That's pretty darn huge. I
reject pages that have much over 1K...

--
"I am Dyslexic of Borg. Resistors are fertile. Prepare to have your
ass laminated." -- Dan Nitschke

Marc C. Brooks
http://musingmarc.blogspot.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Loading...