none
Overflow the SQL query string buffer RRS feed

  • Question

  • Hello,

    I have a report that is using a query to determine values for a parameter. In Report Builder everything renders fine, but when I publish the report on the Report Server, it will not render if too many values are entered for the parameter, including "Select All". The reason for this behavior is likely due to the number of possible values for the parameter being over 2500. My research has shown that this is causing an overflow of the SQL query string buffer. The obvious fix is to not use that column as a parameter, but the power that be are insisting. My system administrator says he can likely increase the buffer size, but has asked me to find out how and where to do that. Any help would be much appreciated.

    Wednesday, October 1, 2014 7:10 PM

Answers

  • Hi CrazyAlligator,

    According to your description, you have more than 2500 values within a parameter. It throws overflow exception when selecting all values. Right?

    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. This new limit can be configured on a per-application basis. Please see the "Resolution" section for configuration instructions. Please refer the KB article: https://support2.microsoft.com/kb/2661403?wa=wsignin1.0

    In this scenario, we need add the setting in the web.config file. Please follow the steps below:

    1. Go to the reporting services installation folder.
    2. Go to the report server folder and make a backup of the file “Web.config”. Once you have the backup, open the original file in notepad and add the following entry under the Configuration section:
          <appSettings>
                      <add key="aspnet:MaxHttpCollectionKeys" value="10000"/>
          </appSettings>
    3. Go to the Report Manager folder and again make a backup of the file “Web.config”. Once you have the backup, open the original file in notepad and add the following entry under the appSettings tag:
      <add key="aspnet:MaxHttpCollectionKeys" value="10000"/

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    Monday, October 6, 2014 11:55 AM
    Moderator