For some reason the viewstate of my application became gigantic (around 14 million characters). It adds around 1 minute of loading time. If the page finally loads (which is not often), the server crashes every time someone send a form because "Post size exceeded allowed limits.
"
It appeared suddenly. I didn't add any fields, just some javascript on the page.
People told me to check viewstate chunking out. Google told me to do this:
<pages maxPageStateFieldLength="1024">
... so now instead of a huge hidden field I now have something like 100 very large hidden fields. It's not exactly what I was looking for.
Why would .NET do something like this? How can I fix this?