URL-encoded form data is not valid


I have a webpage that posts multiple form tags. It's an inline edit page, where I can either post one row at a time or multiple rows. Last night, without making any changes to the code or data, I started getting The URL-encoded form data is not valid error on multiple posts, although single row posts work fine.

Best Solution

The MS KB issue in question is: 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:

<add key="aspnet:MaxHttpCollectionKeys" value="some number greater than 1000" />