In my code I am consuming an asmx web service and recently I changed the url from http to https, for eg. Ealier the url was:http://[email protected]/abc/webservices/pqr.asmx, and now it has been changed to: https://[email protected]/abc/webservices/pqr.asmx.

In my web.config I have made the following changes:

<system.serviceModel>

  <basicHttpBinding>
    <binding name="ApplicationMessagingWSSoap12" closeTimeout="00:02:00"
      openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:02:00"          
      maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
      transferMode="Buffered">
      <readerQuotas maxDepth="2000001" maxStringContentLength="2000001"
    maxArrayLength="2000001" maxBytesPerRead="2000001" maxNameTableCharCount="2000001" /
  <security mode="Transport" />
    </binding>
  </basicHttpBinding>
</bindings>
<client>
 
  <endpoint address="https://[email protected]/abc/webservices/pqr.asmx" binding="basicHttpBinding" bindingConfiguration="ApplicationMessagingWSSoap12" contract="MSSInterface.ApplicationMessagingWSSoap" name="ApplicationMessagingWSSoap12" />
</client>

</system.serviceModel>

But I am getting the issue: 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.

I tried all the techniques I found over net but no luck yet.

Please can anybody help me with a solution , Thanks in advance :)

1

There are 1 answers

0
Priyanka On

I was getting the issue after I changed the url of the web service my code was consuming from http to https. I increased the size of message in the binding tag but still i was facing the issue, but after adding the following line it solved my issue:

<httpsTransport maxReceivedMessageSize="2147483647"  />

Posting it, so that my answer may help someone in future with similar kind of issue. thanks:)