I have a page that has a really huge viewstate (>300KB). ...Yeah, I know. I've narrowed this anomaly down to one user control, but am having trouble determining what exactly that control is putting in there.
I've overridden SavePageStateToPersistenceMedium in the page, but am not great at working with the viewstate object passed in. Could I pass it in to some recursive function that would print out everything that's in the object?
I've tried using freely available viewstate decoders, but none have worked. I always get errors when it attempts to deserialize the viewstate.
I'm pretty much looking for a code snippet here.
Thanks,
Mark
Thanks for the traceing suggestion, esp. the trace.axd thing. But that still only tells me how big the controls are, it doesn't tell me what's in the viewstate. I want to be able to see if there are objects that I'm erroneously serializing to viewstate.
I used to use trace.axd. It lists each request and dumps the contents of the viewstate. You'll have to enable tracing in web.config. If you've got lots of requests you'll want to update the cache size to more than 10.
Fritz Onion's ViewState Decoder is what you need!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With