WCF: Increase the maximum message size quota

01. December 2013 WCF 0

When too much data is transferring via WCF service you need to adjust the maximum message size in the web/app.config of the running application.

Example:

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
          <binding name="basicHttpUserService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                    maxArrayLength="2147483647" maxBytesPerRead="2147483647"
                    maxNameTableCharCount="2147483647"/>
          </binding>
 
          <binding name="basicHttpBroadcastLogService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                  maxArrayLength="2147483647" maxBytesPerRead="2147483647"
                  maxNameTableCharCount="2147483647"/>
          </binding>
        </basicHttpBinding>
    </bindings>
</nsystem.serviceModel>

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.