I am trying to implement compression for our WCF service, using a netTCP endpoint. I've read almost all the developer network posts, and the posts on SO, to no avail.
How does one configure the client endpoint CompressionFormat (See compression and the binary encoder) property? Is this in fact necessary when you've added a service reference in VS to get the generated endpoints?
I've done the standard config of the endpoint in the server app.config 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've changed the binding used on the client to implement compression on the client side as well:
<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>