469,622 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,622 developers. It's quick & easy.

Viewstate errors

We have managed to lock down 99% of the application errors occurring in our
asp.net sites. The only errors which occur on a regular basis now are
viewstate errors. We have disabled viewstate on the majority of pages but
kept them where absolutely necessary, such as shopping carts, adding items,
etc.

Also we've made sure the following have been met:
EnableViewStateMac = false
Disabled viewstate on all controls which are unnecessary
Try using more simplified controls

So our viewstate shouldn't be getting too big. We get the "Viewstate is
invalid" error message cropping up on a small percentage of requests -
depends on activity of the site but overall it is only between 1%-5% of
requests. Although this amount is small I still can't see why viewstate
errors are occurring? The browser types vary (and include MS IE) and we
haven't been able to replicate the error ourselves. Has anyone had this
problem or found a way to track down the causes for the errors?

Thanks,

Janaka
Nov 18 '05 #1
2 1839
Viewstate error are hard to track down. the Viewstate is a hidden field, and
any change in its postback value leads to a viewstate error. with the
internet you are dealing with a lot of varibles: browsers, proxy servers,
firewalls, etc.

if one of your clients is having solid problem, you might track it down. for
instance, there are proxy servers that valid postback data, and the
viewstate data gets dropped because the hidden field starts with "_", which
is an illegel first character under the w3c standard. long viewstates are
prone to truncation.

if you really want to research, add a filter that log the outgoing viewstate
(and a request guid - store as a hidden field), and compares the incoming
viewstate to saved value, so you can see the actual transformation.

-- bruce (sqlwork.com)
"Janaka" <ja*****@hotmail.com> wrote in message
news:uV*************@TK2MSFTNGP12.phx.gbl...
We have managed to lock down 99% of the application errors occurring in our asp.net sites. The only errors which occur on a regular basis now are
viewstate errors. We have disabled viewstate on the majority of pages but
kept them where absolutely necessary, such as shopping carts, adding items, etc.

Also we've made sure the following have been met:
EnableViewStateMac = false
Disabled viewstate on all controls which are unnecessary
Try using more simplified controls

So our viewstate shouldn't be getting too big. We get the "Viewstate is
invalid" error message cropping up on a small percentage of requests -
depends on activity of the site but overall it is only between 1%-5% of
requests. Although this amount is small I still can't see why viewstate
errors are occurring? The browser types vary (and include MS IE) and we
haven't been able to replicate the error ourselves. Has anyone had this
problem or found a way to track down the causes for the errors?

Thanks,

Janaka

Nov 18 '05 #2
Bruce,

Thanks for the reply. It still seems a bit flakey to me but I will try to
log the viewstate and check for changes.

Cheers,

J
"bruce barker" <no***********@safeco.com> wrote in message
news:O9****************@TK2MSFTNGP10.phx.gbl...
Viewstate error are hard to track down. the Viewstate is a hidden field,
and
any change in its postback value leads to a viewstate error. with the
internet you are dealing with a lot of varibles: browsers, proxy servers,
firewalls, etc.

if one of your clients is having solid problem, you might track it down.
for
instance, there are proxy servers that valid postback data, and the
viewstate data gets dropped because the hidden field starts with "_",
which
is an illegel first character under the w3c standard. long viewstates are
prone to truncation.

if you really want to research, add a filter that log the outgoing
viewstate
(and a request guid - store as a hidden field), and compares the incoming
viewstate to saved value, so you can see the actual transformation.

-- bruce (sqlwork.com)
"Janaka" <ja*****@hotmail.com> wrote in message
news:uV*************@TK2MSFTNGP12.phx.gbl...
We have managed to lock down 99% of the application errors occurring in

our
asp.net sites. The only errors which occur on a regular basis now are
viewstate errors. We have disabled viewstate on the majority of pages
but
kept them where absolutely necessary, such as shopping carts, adding

items,
etc.

Also we've made sure the following have been met:
EnableViewStateMac = false
Disabled viewstate on all controls which are unnecessary
Try using more simplified controls

So our viewstate shouldn't be getting too big. We get the "Viewstate is
invalid" error message cropping up on a small percentage of requests -
depends on activity of the site but overall it is only between 1%-5% of
requests. Although this amount is small I still can't see why viewstate
errors are occurring? The browser types vary (and include MS IE) and we
haven't been able to replicate the error ourselves. Has anyone had this
problem or found a way to track down the causes for the errors?

Thanks,

Janaka


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mind Dragon | last post: by
2 posts views Thread by Max Metral | last post: by
11 posts views Thread by Nad | last post: by
10 posts views Thread by Robert | last post: by
5 posts views Thread by Tarun Mistry | last post: by
1 post views Thread by Tarun Mistry | last post: by
1 post views Thread by scottrm | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.