Web-Service returning maximum quota exceeded. How to resolve?

Asked

Viewed 406 times

-1

I’m consuming a third-party web-service. When I get the return from the service the following message is displayed:

Maximum input message size (65536) exceeded

I’ve searched forums for a solution, but I haven’t been successful with any... I leave below my app.config for verification.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <diagnostics>
            <messageLogging maxSizeOfMessageToLog="2147483647" />
        </diagnostics>
        <bindings>
            <basicHttpBinding>
                <binding name="WorkflowWebServiceSoap" maxBufferPoolSize="2147483647"
                    maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
            </basicHttpBinding>
            <customBinding>
                <binding name="WorkflowWebServiceSoap12">
                    <textMessageEncoding messageVersion="Soap12" />
                    <httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                        maxBufferSize="2147483647" />
                </binding>
            </customBinding>
        </bindings>
        <client>
            <endpoint address="URL DO WEB SERVICE"
                binding="customBinding" bindingConfiguration="WorkflowWebServiceSoap12"
                contract="ServiceReference1.WorkflowWebServiceSoap" name="WorkflowWebServiceSoap12" />
        </client>
    </system.serviceModel>
</configuration>

Would anyone have any solution proposal?

  • 2

    Decreasing the message size is a solution.

  • Remember that a service has two points, client and server. It needs to be configured to accept the size of the message in both.

  • @Ricardopunctual Thanks, unfortunately I can not decrease the size of the message. Ricardo, I need to configure something on the other side ? That is, the web-service I am consuming should set that on their side as well ? Thank you

  • That’s right, it’s a Webservice written in . Net?

1 answer

0

I had this error, but the problem was on the client side, and was just changing the security mode of basicHttpBinding:

<basicHttpBinding>
    <binding name="WServicoSoapBinding">
        <security mode="Transport" />
    </binding>
</basicHttpBinding>

It can also be done by instantiating the object:

objWS = new NS.WServicoClient(new BasicHttpBinding(BasicHttpSecurityMode.Transport), new EndpointAddress(this.UrlWS));
  • The service is in HTTP and not HTTPS. This security would work the same way ?

  • I think the basicHttpBinding is the same for both. Including this Ws that I use, is HTTPS too.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.