NetTcpSecurity.Message 属性

定义

为用 NetTcpBinding 配置的服务获取消息级安全性要求的类型。

public:
 property System::ServiceModel::MessageSecurityOverTcp ^ Message { System::ServiceModel::MessageSecurityOverTcp ^ get(); void set(System::ServiceModel::MessageSecurityOverTcp ^ value); };
public:
 property System::ServiceModel::MessageSecurityOverTcp ^ Message { System::ServiceModel::MessageSecurityOverTcp ^ get(); };
public System.ServiceModel.MessageSecurityOverTcp Message { get; set; }
public System.ServiceModel.MessageSecurityOverTcp Message { get; }
member this.Message : System.ServiceModel.MessageSecurityOverTcp with get, set
member this.Message : System.ServiceModel.MessageSecurityOverTcp
Public Property Message As MessageSecurityOverTcp
Public ReadOnly Property Message As MessageSecurityOverTcp

属性值

为终结点指示消息级安全性要求类型的 MessageSecurityOverTcp

示例

NetTcpSecurity security = binding.Security;
MessageSecurityOverTcp msTcp = security.Message;

Console.WriteLine("Dumping NetTcpSecurity object:");
Console.WriteLine("\tMessageSecurityOverTcp:");
Console.WriteLine("\t\tAlgorithm Suite: {0}", msTcp.AlgorithmSuite);
Console.WriteLine("\t\tClient Credential Type: {0}", msTcp.ClientCredentialType);

注解

Message 使用消息级安全性,以获得 SOAP 消息的完整性和保密性以及通信对等方的相互身份验证。 如果在绑定上选择此安全模式,则使用消息安全性绑定元素配置信道堆栈,并且 SOAP 消息可按照 WS-Security* 标准进行保护。

适用于