I have this asp.net web forms application through which users can log on and view a number of records from a database and then make modification as needed. However, as the number of records have increased for users; for some users with a large number of records, the site is failing with the message "form data is not valid".
Since the issue is happening only for large accounts, I was somewhat certain that it's related to the number of form elements that can be posted back to the server. Microsoft introduced an upper limit to the number of the form elements that can be posted back to the server - http://weblogs.asp.net/scottgu/archive/2011/12/28/asp-net-security-update-shipping-thursday-dec-29th.aspx. So, to fix the issue, I added a new app setting in web.config file called "aspnet:MaxHttpCollectionKeys" and set its value to a number - 5000. And that's it - the site started working fine again.
Just to be clear though, I think this is a temporary fix and the application should be modified anyway as sooner or later that new limit might be reached as well.