Deepesh
Deepesh

Reputation: 5614

Net TCP Binding Security

If i have written this code on Client Side then does my communication is not secured or default security will continue ? Secondly does data being transfered in Encrypted one? On Server side we have done nothing for security.

NetTcpBinding objNetTcpBinding = new NetTcpBinding();
objNetTcpBinding.Security.Mode = SecurityMode.None;
objNetTcpBinding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None;
objNetTcpBinding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
objNetTcpBinding.Security.Message.ClientCredentialType = MessageCredentialType.None;

Upvotes: 1

Views: 1130

Answers (1)

Guillermo Gomez
Guillermo Gomez

Reputation: 1785

By default the NetTcp binding is secured at the transport level. If you disabled security on the client it must also be disabled at the server, or an exception will occur. In this scenario, the transport will not be secured.

Upvotes: 2

Related Questions