SSRS JavaScript Error – SharePoint SQL Reporting Services

Here is short detail of a SSRS related issue that I had recently worked on. While rendering the SSRS reports in a project server site we were getting the below JS error.

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

<!DOCTYPE html PUB'.

Line: 5

Char: 62099

Code: 0

URI: /ScriptResource.axd?d=">/ScriptResource.axd?d=">/ScriptResource.axd?d=">/ScriptResource.axd?d=">http://<site>/ScriptResource.axd?d=

Issue was related to ASP.NET MAXHttpCollectionKeys limit. While looking at the SharePoint ULS Logs , we could see the below exception.

System.InvalidOperationException: Operation is not valid due to the current state of the object.    at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()     at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)     at System.Web.HttpRequest.FillInFormCollection()

Possible root cause – 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. SSRS report filtering column were sending as HTTPCollectionKeys and that was reaching the maximum limit.

Followed the Microsoft supported solution in

Adding the following to the web.config for the project server web site resolved the issue.


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


Make sure that if you have multiple Web Frontend servers, then have to add the above entry in all of them. (don’t forget take a backup of the web.config before making any modification)


Comments (4)
  1. Sridhar says:

    Really helpful – thanks a lot!

  2. Glenn Wilson says:

    Nice, thanks for this.

  3. sowmyancs says:

    Thanks guys 🙂

  4. Sriram E says:

    Thanks for this article sowmyan, it will save my time to convince my customer. 🙂

    More Info: It occurred on IE 10. It works fine in IE 11 and Chrome.

Comments are closed.

Skip to main content