Convert netTcpBinding TransportWithMessageCredential security to customBinding

148 Views Asked by At

I have a WCF Service with netTcpBinding and I want to add GZip compression to it.

Here is my current binding:

        <netTcpBinding>
            <binding>
                <security mode="TransportWithMessageCredential">
                    <message clientCredentialType="UserName" />
                </security>
            </binding>
        </netTcpBinding>

But to add GZip Compression, I need to convert it to a customBinding.

So I think the new binding must looks like this:

        <customBinding>
            <binding>
                <security ??? />
                <binaryMessageEncoding compressionFormat="GZip" />
                <tcpTransport />
            </binding>
        </customBinding>

How can I achieve mode="TransportWithMessageCredential" and clientCredentialType="UserName" of netTcpBinding in customBinding?

0

There are 0 best solutions below