Export XForms data to Excel fails when more than 1000 rows

I have notice that an exception is thrown if you try to export more than 1000 rows of data to excel in EPiServer CMS 6.0 R2.
The problem can emerge if you have a lot of answers in a XForm survey for example.

The exception info that is shown is: The URL-encoded form data is not valid. And System.InvalidOperationException: Operation is not valid due to the current state of the object.

Don’t worry there is a quick fix to this problem!

Microsoft security update MS11-100 limits the maximum number of form keys, files, and JSON members to 1000 in an HTTP request. Because of this change, ASP.NET applications reject requests that have more than 1000 of these elements. HTTP clients that make these kinds of requests will be denied, and an error message will appear in the web browser. The error message will usually have an HTTP 500 status code

To override this behavior you just add the following to your web.config

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