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>