Calling WCF service from excel gives error on received message size RRS feed

  • Question

  • I am calling my WCF service from excel VBA code using moniker string. However, as my service returns large data as response, excel gives error message

    "Maximum message size quota for incoming messages (65534) has been exceeded. To increase the quota used the MaxReceivedMessageSize property on the appropriate binding element"

    I increased the size in my WCF service's web.config file as follows. Still getting same error in excel vba. 

            <binding name="BasicHttpBinding_IService1" 
              hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
              maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
              <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
                maxArrayLength="2147483647" />
    I am using Excel as my client, which has VB6 as code behind. How to increase/specify maximum received message size in excel vba?

    Thursday, September 18, 2014 6:40 AM


  • Your service side Web config is wrong concerning this. And what you have given as new settings are being ignored.

    You have to use a custom binding on the service side config and give new settings in the custom binding and point to the custom binding.

    The service would below up on inbound data sent to it from the cleint, if data is too much and is beyond the default settings. Likewise, the WCF client would blow up if the service sent too much data beyond the default settings on the client.

    So just who is blowing up and and are you addressing the right side of client or service that is having the problem?

    Note: Client-side changing WCF config settings in not like the service WCF config sstting, and you don't need the custom binding on the client side. So you can give the readerquota and other seetings like you are doing above on the client side. But you can't do the same thing on the service side without using the custom binding,  and within the custom binding, you give new readerquota seetings.

    Thursday, September 18, 2014 7:33 PM