HttpTransportSecurity.ClientCredentialType 属性

定义

获取或设置要用于身份验证的客户端凭据的类型。Gets or sets the type of client credential to be used for authentication.

public:
 property System::ServiceModel::HttpClientCredentialType ClientCredentialType { System::ServiceModel::HttpClientCredentialType get(); void set(System::ServiceModel::HttpClientCredentialType value); };
public System.ServiceModel.HttpClientCredentialType ClientCredentialType { get; set; }
member this.ClientCredentialType : System.ServiceModel.HttpClientCredentialType with get, set
Public Property ClientCredentialType As HttpClientCredentialType

属性值

枚举值之一,指示要用于身份验证的客户端凭据的类型。One of the enumeration values that indicates the type of client credential to be used for authentication.

异常

将此属性设置为未定义的值。Setting the property to an undefined value.

示例

下面的代码演示如何访问和设置此属性。The following code shows how to access and set this property.

// The code uses a shortcut to specify the security mode to Transport.
WSHttpBinding b = new WSHttpBinding(SecurityMode.Transport);
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
' The code uses a shortcut to specify the security mode to Transport.
Dim b As WSHttpBinding = New WSHttpBinding(SecurityMode.Transport)
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows

注解

返回值可以是下列枚举成员之一:The return value can be one of the following enumeration members:

适用于