MessageSecurityOverHttp.ClientCredentialType 属性

定义

指定在 wsHttpBinding 或 wsDualHttpBinding 绑定中用于客户端身份验证的客户端凭据的类型。Specifies the type of client credential used for client authentication in the wsHttpBinding or wsDualHttpBinding bindings.

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

MessageCredentialTypeA MessageCredentialType. 默认值为 WindowsThe default is Windows.

例外

示例

下面的代码设置此属性。The following code sets this property.

WSHttpBinding myBinding = new WSHttpBinding();
myBinding.Security.Mode = SecurityMode.Message;
myBinding.Security.Message.ClientCredentialType =
    MessageCredentialType.Windows;

注解

此属性可用来设置用于验证服务调用方的 MessageCredentialTypeThis property is used to set the MessageCredentialType that is used to authenticate the caller at the service. 有效类型包括:Valid types are:

适用于