How do I increase the array length quota for reports?

When I run a report, I get a message that says:

Error: 500 Internal Server Error
Message: The maximum array length quota (4194304) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.

How do I fix this issue?

This can be modified by your Database Administrator (DBA), or someone with access to make changes directly on the server.

If that describes you, here are the instructions to modify this value:

  1. Locate your web.config file (located in the root folder)
  2. Search for the string HifisReportService
  3. Find the endpoint element for HifisReportService. It should look something like this:
    <endpoint address="http://HIFIS_DOMAIN_ADDRESS/HIFIS.DOMAIN.BusinessServices.HifisReportService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_Standard" contract="HifisReportServiceReference.IHifisReportService" name="WSHttpBinding_IHifisReportService">
  4. Identify the bindingConfiguration being used (for example: bindingConfiguration="WSHttpBinding_Standard")
  5. Search for the binding element identified in step 4  (for example: WSHttpBinding_Standard). It should look something like this:
    <binding name="WSHttpBinding_Standard" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:05:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="10485760" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
  6. Within the binding element identified in step 5, locate the readerQuotas object. It should look something like this:
    <readerQuotas maxDepth="32" maxStringContentLength="4194304" maxArrayLength="101943040" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
  7. Increase the maxStringContentLength and/or the maxArrayLength property to the desired values
  8. Repeat steps 1-7 for the file located at Domain\web.config