Thursday, August 25, 2011

WCF The maximum message size quota for incoming messages (65536) has been exceeded


Need to change the below settings in client configuration.
Increase the size for maxReceivedMessageSize, maxBufferSize, maxBufferPoolSize, maxArrayLength, maxStringContentLength in Web.Config
<bindings>
    <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
            <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
        </binding>
    </basicHttpBinding>
</bindings>