1

I would like to ask for your help because sometimes I get an error message when I call a service : 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.

On one side :

<bindings>
   <basicHttpBinding>
    <binding name="BasicHttp" bypassProxyOnLocal="true"
     maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
     transferMode="Buffered">
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     <security mode="None" />
    </binding>
   </basicHttpBinding>
   <webHttpBinding>
    <binding name="WebHttp" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>
   </webHttpBinding>
 </bindings>
<client>
   <endpoint address="http://xxx:7575/MyRequest.svc" behaviorConfiguration="webhttp"
    binding="webHttpBinding" bindingConfiguration="WebHttp"
    contract="MyService.Service.Contract.IRequestService" name="MyServiceEndpoint" />
 </client>

on the other side (xxx) :

<system.serviceModel>
    <services>
        <service name="MyService.Service.RequestService" behaviorConfiguration="ServiceEndpointBehavior">
            <endpoint address="" binding="webHttpBinding" contract="MyService.Service.Contract.IRequestService" behaviorConfiguration="RestEndPointBehavior" bindingConfiguration="WebHttp"/>
        </service>
    </services>
    <bindings>
        <basicHttpBinding>
        </basicHttpBinding>
        <webHttpBinding>
            <binding name="WebHttp" allowCookies="true" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
            <readerQuotas maxDepth="32" maxArrayLength="2147483647" maxStringContentLength="2147483647"/>
            </binding>
        </webHttpBinding>
        </bindings>
</system.serviceModel>

Jojo

I tried several things following the different topics with the same error on "stackoverflow" but nothing works. Thanks in advance

Jojo
  • 11
  • 1

1 Answers1

0

As far as I know, if increasing this value alone doesn't work you may also increase the value of httpRuntime.

If this doesn't work, try BasicHttpBinding.

Jiayao
  • 510
  • 3
  • 7