2

I am successfully able to call WCF service using mexTcpBinding and moniker string Below is vb script for building moniker string

    Dim addrToWCFService As String
addrToWCFService = "service4:mexAddress=net.tcp://10.44.19.20/PruCapWebCMHost/API/Excel/ExcelAPIService.svc/mexTCP, "
addrToWCFService = addrToWCFService + "address=net.tcp://10.44.19.20/PruCapWebCMHost/API/Excel/ExcelAPIService.svc, "
 addrToWCFService = addrToWCFService + "contract=IExcelAPIService, contractNamespace=http://Excel/Services, "
addrToWCFService = addrToWCFService + "binding=NetTcpBinding_IExcelAPIService, bindingConfiguration=IExcelAPIService, bindingNamespace=http://Excel/Services"

Service configuration in web.config is

<system.serviceModel>
<bindings>
  <netTcpBinding>
    <binding name="NetTcpBinding_IPublicService" maxReceivedMessageSize="8388608" maxBufferSize="8388608" portSharingEnabled="true">
      <security></security>
    </binding>
  </netTcpBinding>
</bindings><services>
<service name="ExcelAPI.ExcelAPIService" behaviorConfiguration="PublicServiceTypeBehaviors">
    <endpoint address="" bindingNamespace="http://Excel/Services" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IPublicService" contract="ExcelAPI.IExcelAPIService" name="NetTcpBinding_IExcelAPIService" />
    <endpoint address="mexTCP" bindingNamespace="http://Excel/Services" binding="mexTcpBinding" contract="IMetadataExchange" bindingName="NetTcpBinding_IPublicService" name="MexTcpBinding_IExcelAPIService"/>
 </service>

When I call one of the method in the service which is returning data more than 65356 size, I am getting error saying "Maximum message size quota for incoming messages (65534) has been exceeded. To increase the quota used the MaxReceivedMessageSize property on the appropriate binding element"

Now I am struggling with where to set this property to higher value. I tried creating Excel.exe.config file and putting in in Excel.exe folder. I now want how to set MaxReceivedMessageSize to a value "8388608" in my case and which config file it needs to be set Excel.exe.config or something else which will tell moniker proxy to use. Can anyone please help me in resolving this tricky issue.

I have created Excel.exe.config file added following into it, but some how its not taking these settings, Can anyone please help me in getting this problem solved. or confirm that this is the inherent problem or limitation of moniker proxies?

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.serviceModel>
        <bindings>
          <netTcpBinding>
            <binding name="IExcelAPIService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                maxBufferPoolSize="8388608" maxBufferSize="8388608" maxConnections="10"
                maxReceivedMessageSize="8388608">
              <security >
              </security>
            </binding>
          </netTcpBinding>
        </bindings>
        <client>
          <endpoint address="net.tcp://10.44.19.20/PruCapWebCMHost/API/Excel/ExcelAPIService.svc"
              binding="netTcpBinding" bindingConfiguration="IExcelAPIService"
              contract="IExcelAPIService" name="NetTcpBinding_IExcelAPIService">
          </endpoint>
        </client>
      </system.serviceModel>
    </configuration>
Community
  • 1
  • 1

1 Answers1

0

Have you looked at this solution. I think it will address your issue.

Do you get the same error when calling form the WCF Test client?

Community
  • 1
  • 1
Adach1979
  • 278
  • 2
  • 8
  • I have build the .NET client for example TestWCF.exe, I can have Test.exe.config file where I can set MaxReceivedMessageSize for the binding. I am struggling when I am trying to call the same service from Excel in the area how to set the same setting in Excel.exe.config file and tell moniker proxy to use that settings. I know how to set, but don't know how to make moniker proxy to use those settings. – TyringBestToResolve Apr 18 '14 at 07:27