My project has a netTCP WCF service. To do this, use app.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <bindings> <netTcpBinding> <binding name="NetTcpBinding_IIndexer" 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="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="None"> <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> <message clientCredentialType="Windows" /> </security> </binding> </netTcpBinding> </bindings> <client> <endpoint address="net.tcp://mach1:9000/Indexer" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IIndexer" contract="in.IIndexer" name="NetTcpBinding_IIndexer" /> </client> </system.serviceModel> </configuration>
Is there anything that can be done to maximize the compression of data sent over the wire? My project is internal, so speed and processing power are essentially not a problem.
What are some helpful tips and tricks for compressing data sent by the client to the WCF service?
source share