I am trying to implement compression for our WCF service using the netTCP endpoint. I read almost all the posts on the development network, and posts on SO, to no avail.
How to configure client endpoint of CompressionFormat (see compression and binary encoder) property? Is this really necessary if you added a service link in VS to get the generated endpoints?
I made a standard endpoint configuration in the server.config server file:
<customBinding>
<binding name="tcpCompression">
<windowsStreamSecurity protectionLevel="None"/>
<binaryMessageEncoding compressionFormat="GZip"/>
<tcpTransport/>
</binding>
...
</customBinding>
And I can make a call from the client using this endpoint.
This is the client endpoint:
Edit: I changed the binding used on the client to implement client-side compression:
<endpoint
address="net.tcp://localhost:8734/Quasar/QuasarService"
binding="customBinding"
bindingConfiguration="netTcpCompression"
contract="Quasar.IQuasarService"
name="CustomBinding_IQuasarService">
<identity>
<userPrincipalName value="foo@bar.com" />
</identity>
</endpoint>
<customBinding>
<binding name="netTcpCompression">
<windowsStreamSecurity protectionLevel="None"/>
<binaryMessageEncoding compressionFormat="GZip"/>
<tcpTransport maxReceivedMessageSize="1000000"/>
</binding>
</customBinding>