The maximum message size quota for incoming messages (65536) has been exceeded in asmx issue
11,120
Figured it out...
In web config of the application:
Keep on identical naming in client and binding tags
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:60971/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceClient.IService1" name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
Author by
Nir-Z
Updated on June 05, 2022Comments
-
Nir-Z about 2 years
I'm having the following message:
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
in my mvc 4 application using a web service.The web service is a asmx file. I've tries some of the solutions mentioned in the forum (like exending the maxReceivedMessageSize), but still I got the same error message:
My web config:
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <directoryBrowse enabled="true"/> </system.webServer> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="ServiceSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> </basicHttpBinding> </bindings> <client> <endpoint address="http://haifaws.haifanet.org.il/service.asmx" binding="basicHttpBinding" bindingConfiguration="ServiceSoap" contract="ServiceReference1.ServiceSoap" name="ServiceSoap" /> <endpoint address="http://haifaws.haifanet.org.il/service2.asmx" binding="basicHttpBinding" bindingConfiguration="Service2Soap" contract="ServiceReference2.Service2Soap" name="Service2Soap" /> </client> </system.serviceModel> </configuration>
Thanks a lot