none
Issue Exporting SSRS 2012 Report to CSV file in SharePoint 2010 (MaxReceivedMessageSize property exceeded) RRS feed

  • Question

  • Hi,

    We have recently deployed SSRS 2012 integrated with SharePoint 2010 in our environment.

    When a user is trying to export a SSRS report (in SharePoint) to a CSV file (Around 400K records), The browser opens a new window (which trys to bring the download dialog box) but this window throws this error after approximately 120 seconds (Time out error I guess)


    We checked the SharePoint logs under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

    Searched the log file for the Correlation ID, Here are the errors i found for this ID:

    As highlighted , The Unexpected error is:  'System.ServiceModel.QuotaExceededException:The maximum message size quota for incoming messages(115343360) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element'.'

    We tried making Changes to the web.config file on the server for the SharePoint site. 

    http://social.msdn.microsoft.com/forums/en-US/wcf/thread/ba6e21a7-9ab3-46b5-8240-5e3175af09ff

    We added this block in the web.config :

     <system.serviceModel>
       <bindings>
          <wsHttpBinding>
            <binding name="wsHttpBindingSettings" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" messageEncoding="Text">
              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
            </binding>
          </wsHttpBinding>
        </bindings>
        <services>
          <service name="Csla.Server.Hosts.WcfPortal">
            <endpoint contract="Csla.Server.Hosts.IWcfPortal" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingSettings" />
          </service>
        </services>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      </system.serviceModel>

    But looks like this is not taking any affect. We are still getting the same error.

    Any help would be greatly appreciated. We are not knowing where the value of MaxReceivedMessageSize needs to be set.

    Thanks,

    Karteek.


    • Edited by gspkarteek Sunday, June 3, 2012 9:48 PM Slelling
    Sunday, June 3, 2012 9:43 PM

Answers

  • Here is the solution:

    Exporting (huge) SSRS reports into CSV files on SharePoint 2010:

     

    1. Set ExecutionTimeOut to 15 mins
      • Make a backup of C:\inetpub\wwwroot\wss\VirtualDirectories\Reports80\web.config
      • Open C:\inetpub\wwwroot\wss\VirtualDirectories\Reports80\web.config
      • Search for httpRuntime maxRequestLength
      •  For the 1st Instance of the Search result where you see httpRuntime maxRequestLength="51200”, add executionTimeout="9000".

     So, the whole line would look like <httpRuntime maxRequestLength="51200"     executionTimeout="9000" />

    • Save it, close it.
      1. Change the Client Config to increase maxReceivedMessageSize
    • Make a backup of C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Reporting\client.config
    • Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Reporting\client.config
    • Search for  maxReceivedMessageSize
    • Where ever you see maxReceivedMessageSize = ‘115343360’, Change it to maxReceivedMessageSize = '1153433600' There must be 4 instances like this.
    • Save it, close it.
      1. Change the Server Config to increase maxReceivedMessageSize
    • Make a backup of C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Reporting\web.config
    • Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Reporting\web.config
    • Search for  maxReceivedMessageSize
    • Where ever you see maxReceivedMessageSize = ‘115343360’, Change it to maxReceivedMessageSize = '1153433600' There must be 4 instances like this.
    • Save it, close it.
      1. Restart Webserver
    • Open INETMGR
    • Restart the webserver. (***Beware all websites will be down until the webserver comes back up***)
    • Browse the report and download the CSV with no issues.

    Thanks to www.altafkhatri.com for the valuable solution.!! Hope this helps many more people..


    • Marked as answer by gspkarteek Tuesday, June 5, 2012 3:11 AM
    • Edited by gspkarteek Tuesday, June 5, 2012 4:51 AM
    Tuesday, June 5, 2012 3:10 AM