MessageSecurityOverTcp.ClientCredentialType 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定客户端用于向 SOAP 级服务进行身份验证的客户端凭据类型。
public:
property System::ServiceModel::MessageCredentialType ClientCredentialType { System::ServiceModel::MessageCredentialType get(); void set(System::ServiceModel::MessageCredentialType value); };
public System.ServiceModel.MessageCredentialType ClientCredentialType { get; set; }
member this.ClientCredentialType : System.ServiceModel.MessageCredentialType with get, set
Public Property ClientCredentialType As MessageCredentialType
属性值
MessageCredentialType。 默认值为 Windows。
例外
示例
下面的代码演示如何访问和设置此属性。
NetTcpBinding binding = new NetTcpBinding();
// Specify the mode, then the credential type.
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType =
MessageCredentialType.UserName;
binding.Security.Message.AlgorithmSuite =
System.ServiceModel.Security.SecurityAlgorithmSuite.Basic256;
Dim binding As New NetTcpBinding()
' Specify the mode, then the credential type.
binding.Security.Mode = SecurityMode.Message
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName
binding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Basic256
注解
返回值可以是下列枚举成员之一: