Resolving the "The URL-encoded form data is not valid" Error

Programming, error messages and sample code > ASP.NET
When posting large amounts of data to the server, you may see "The URL-encoded form data is not valid" error.

This error is a side effect of a security fix released by Microsoft (to read more about this issue, see this link: http://weblogs.asp.net/scottgu/archive/2011/12/28/asp-net-security-update-shipping-thursday-dec-29th.aspx)

In a nutshell there is now an upper bound on the number of simultaneous HTTP form elements that may be posted.
The default is now 1000 without explicitly changing it with this key in the <appSettings> portion of the web.config:

<appSettings>
                <add key="aspnet:MaxHttpCollectionKeys" value="2000" />
    </appSettings>