This is not an answer, unfortunately. After a break in the intermittent error, and finally annoyed enough to try to fix it, I still have to find a fix. However, I have identified a recipe for reproducing my problem, which may help others.
In my case, this is TOTALLY a localhost problem on my dev machine, which also has an application database. This is a .NET 2.0 application that I am editing using VS2005. On a 64-bit Win7 machine, VS2008 and .NET 3.5 are also installed.
This will generate an error from many forms:
- Download a new copy of the form.
- Enter some data and / or postback using any of the form controls. Until there is a significant delay, repeat whatever you like and there will be no errors.
- Wait a bit (1 or 2 minutes, maybe no more than 5), and try another reverse gear.
A minute or two of delays are “Waiting for the local host”, and then “Connection was reset” by the browser and global.asax application error trap traps:
Application_Error event: Invalid length for a Base-64 char array. Stack Trace: at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) at System.Web.UI.HiddenFieldPageStatePersister.Load()
In this case, it is not the SIZE of the viewstate, but something like caching the page and / or viewstate, which seems to bite me. Setting <pages> enableEventValidation="false" and viewStateEncryption="Never" in Web.config did not change the behavior. Also did not set maxPageStateFieldLength something modest.
fortboise Sep 30 2018-10-10T00: 00Z
source share