One of the most annoying things ASP.Net is a view state issue. For those who do not know what a view state is, Microsoft defines it as follows:
View state is the method that the ASP.NET page framework uses to preserve page and control values between round trips. When the HTML markup for the page is rendered, the current state of the page and values that must be retained during postback are serialized into base64-encoded strings. This information is then put into the view state hidden field or fields.
We currently have a sharepoint site we created a while back that is producing these view state errors in the form of the dreaded "Sorry, Something Went Wrong" errors. When we dug into the logs we came across this line:
Application error when access /sites/XXX/Lists/Metrics Analytics Request/EditForm.aspx, Error=Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
We contacted Nintex support, but they were not able to provide any more information, because we can not duplicate the issue. It happens sporadically, and there are no commonalities when it does occur. We had the admins make sure we had the correct setting on the server as well, and that was confirmed. It's not a complicated form, it has a large number of fields, and some list lookups. I don't believe it has anything to do with the CSS, but we may strip it out just to be sure. There are some dynamic tabs on this form, which are choice fields, that I believe could be the problem, but I have no proof to back that claim up.
Has anyone seen this type of error, or had similar issues? Is there a batter way to diagnose what controls it is failing on? Any thoughts would be appreciated.