<netTcpBinding> 的 <message> 元素

为使用 <netTcpBinding>配置的终结点定义消息级安全性要求的类型。

架构层次结构

<system.serviceModel>
  <binding>
    <netTcpBinding>
      <binding>
        <netTcpBinding> 的 <security>
          <netTcpBinding> 的 <message> 元素

语法

<message 
      algorithmSuite=System.Servicemodel.Security.SecurityAlgorithmsuite
    clientCredentialType="None/Windows/UserName/Certificate/IssuedToken"/>

属性和元素

以下几节描述了特性、子元素和父元素。

属性

特性 说明

algorithmSuite

设置消息加密和密钥包装算法。算法和密钥大小由 SecurityAlgorithmSuite 类确定。这些算法映射到安全策略语言 (WS-SecurityPolicy) 规范中指定的算法。

下表列出了可能的值。默认值为 Basic256

如果服务绑定指定的 algorithmSuite 值不等于默认值,并且您使用 Svcutil.exe 生成配置文件,则不会正确生成该文件,您必须手动编辑此配置文件,将此属性设置为所需的值。

clientCredentialType

指定要在使用基于消息的安全性执行客户端身份验证时使用的凭据类型。下表列出了可能的值。默认值为 UserName。此属性的类型为 MessageCredentialType

子元素

父元素

元素 说明

<netTcpBinding> 的 <security>

定义 NetTcpBindingElement 的安全功能。

备注

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

另请参见

参考

MessageSecurityOverTcp
Message
Message
NetTcpSecurityElement

概念

<binding>

其他资源

Securing Services and Clients
Windows Communication Foundation Bindings
Configuring System-Provided Bindings
Using Bindings to Configure Services and Clients