閱讀英文

共用方式為


MessageSecurityOverTcp.ClientCredentialType 屬性

定義

指定用戶端用來向 SOAP 層級的服務驗證自身的用戶端認證類型。

public System.ServiceModel.MessageCredentialType ClientCredentialType { get; set; }

屬性值

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;

備註

傳回值可以是下列其中一個列舉成員:

適用於