共用方式為


MessageSecurityOverHttp.ClientCredentialType 屬性

定義

指定 wsHttpBinding 或 wsDualHttpBinding 繫結中用戶端驗證所使用的用戶端認證類型。

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

例外狀況

範例

下列程式碼會設定這個屬性。

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

備註

這個屬性是用來設定 MessageCredentialType (用來驗證服務呼叫者)。 有效類型包括:

適用於