browse by category or date

I encountered this error when trying to invoke a data retrieval method of a third-party web service. The method supposed to return us a ZIP file. The full error message is:

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.

It means the response given by the web service is too big, exceeding the default response length limit which is 65536 bytes ( 64 KB ).

In order to fix this problem, we need to open our web.config / app.config and find section which contains the web service reference. It should be something similar to:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
              <binding name="EntitySoap">
                <security mode="Transport" />
              </binding>              
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://mywebsite.com/WebServices/DataService.asmx"
                binding="basicHttpBinding" bindingConfiguration="EntitySoap" 
                contract="MyNamespace.EntitySoap" name="EntitySoap" />
        </client>
    </system.serviceModel>
</configuration>

Now we need to specify the new limit for the response length. As the error message suggested, we do it by adding maxReceivedMessageSize property to binding tag. In the example below, I don’t know what the maximum file size would be. So I set it to the maximum value permitted, which is the max value of int ( 2 GB ):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
              <binding name="EntitySoap" maxReceivedMessageSize="2147483647">
                <security mode="Transport" />
              </binding>              
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://mywebsite.com/WebServices/DataService.asmx"
                binding="basicHttpBinding" bindingConfiguration="EntitySoap" 
                contract="MyNamespace.EntitySoap" name="EntitySoap" />
        </client>
    </system.serviceModel>
</configuration>

That’s all folks. I hope it helps!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Updated measures for employee and employers:

[Sent by Gov.sg – 2 Mar]

COVID-19: Updated measures for employers and employees

With rising COVID-19 cases abroad, employers should:
– Check www.moh.gov.sg for updates, to decide on travel plans
– Obtain health and travel declaration for employees who have been to or are planning to go to affected regions (Hubei province, mainland China, Daegu city and Cheongdo county in the Republic of Korea)

Employers should review and consider implementing relevant measures in their Business Continuity Plans, e.g.
– Split teams
– Work from home if feasible
– Temperature screening for employees/visitors
– Defer/cancel non-essential large-scale events; take precautions if proceeding

More:
🔘 go.gov.sg/mom-29febtravel
🔘 go.gov.sg/mom-27feb

Update on number of confirmed and discharged cases:

[Sent by Gov.sg]

COVID-19: 2 March Update

As of 12pm:
New cases: 2
Total COVID-19 cases in Singapore: 108
Discharged today: 4
Total discharged: 78
Total remaining in Hospital: 30

1 new case is linked to a known cluster, the other is linked to a previous case.

Most in hospital are stable or improving. 6 are in the intensive care unit – 1 less than yesterday.

Go.gov.sg/moh2mar

Stay safe everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Comparison of QO vs SHN:

[Sent by Gov.sg – 1 Mar]

COVID-19: Quarantine Order (QO) vs Stay-Home Notice (SHN)

QO [Directive under Infectious Diseases Act]
– To isolate suspected carriers or close contacts of carriers
– Stay at home but can be in dedicated facility if no suitable accommodation
– Severe penalties for non-compliance
See: go.gov.sg/gqf-29feb

SHN
– S’pore Citizens, PRs & long-term pass holders who have been in mainland China (outside Hubei), Daegu or Cheongdo in South Korea last 14 days
– Must remain at home at all times
– Penalties for non-compliance

Help for employers and self-employed affected by SHN and QO
go.gov.sg/loasp
go.gov.sg/qoa

More: go.gov.sg/moh-faqs

Update on number of confirmed and discharged cases:

[Sent by Gov.sg]

COVID-19: 1 March Update

As of 12pm:
New cases: 4
Total COVID-19 cases in Singapore: 106
Discharged today: 2
Total discharged: 74
Total remaining in Hospital: 32

3 of the new cases are linked to a previously known cluster.

Most in hospital are stable or improving. 7 are in the intensive care unit.

Go.gov.sg/moh1mar

Stay safe everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: