3
votes

I have this out source service that I referenced in my project and when calling it I get the following 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

so I fixed my bindings in the web config as followings:

<client>
  <endpoint address="MY SERVICE ADDRESS"
    binding="basicHttpBinding" bindingConfiguration="MyBinding"
    contract="MyContract" name="MyImplPort" />
</client>

and in the bindings:

<bindings>
  <basicHttpBinding>
    <binding name="MyBinding" maxBufferPoolSize="2000000000"
      maxBufferSize="2000000000" maxReceivedMessageSize="2000000000"/>
  </basicHttpBinding>
</bindings>

however I still get the same error.
is there a way to fix this?

2
Hey ! did it worked for you after increasing quotas ?Ankit

2 Answers

1
votes

have you increased your readerQuotas ??

readerQuotas defines the constraints on the complexity of SOAP messages that can be processed by endpoints configured with a binding.

like this :

<binding name="MyBinding" maxBufferPoolSize="2000000000"
      maxBufferSize="2000000000" maxReceivedMessageSize="2000000000">
<readerQuotas maxDepth="32" 
                 maxArrayLength="200000000"
                 maxStringContentLength="200000000"/>
</binding>
1
votes

You didn't mention if you're getting this error while sending a request or receiving a response. If it's while receiving a response, the limit corresponds to the Client which you've already set. If you're getting this error while sending the request this limit is on the server side and you'll need to get the limit increased on the server side.

Here's an example