I am working with a project where multiple calls are made to a WCF that is configured like this:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWCF" />
</basicHttpBinding>
<wsHttpBinding>
<binding name="BasicHttpBinding_IWCF" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="URLWCF"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCF"
contract="WCF.IWCF" name="BasicHttpBinding_IWCF" />
</client>
<behaviors>
---------
</behaviors>
</system.serviceModel>
But when making some calls I get this error:
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
The funny thing is that I already have the defined MaxReceivedMessageSize
in the configuration that I have shared with the value:
maxReceivedMessageSize="2147483647"
What am I missing?
Try these settings to your webconfig:
Basically what I adjusted was the
<basicHttpBinding>
.I hope it helps you