NetTcpRelayBinding Constructor ()
Initializes a new instance of the NetTcpRelayBinding class.
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
By default, transport security is used to secure communication (that is, the value of Security.Mode is set to Transport) and reliable sessions are disabled (that is, Enabled is false). The default client authentication type is RelayClientAuthenticationType.RelayAccessToken, which indicates that clients of a service are required to present a security token issued by the Access Control service to Service Bus when sending messages.
The following code example shows how to create a NetTcpRelayBinding using the default constructor.
NetTcpRelayBinding myBinding = new NetTcpRelayBinding(); myBinding.Security.Mode = EndToEndSecurityMode.TransportWithMessageCredential; myBinding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;