MessageSecurityOverTcp.ClientCredentialType Właściwość

Definicja

Określa typ poświadczeń klienta używanych przez klienta do uwierzytelniania się w usłudze na poziomie protokołu 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

Wartość właściwości

MessageCredentialType

Klasa MessageCredentialType. Wartość domyślna to Windows.

Wyjątki

Wartość elementu ClientCredentialType nie jest prawidłową wartością MessageCredentialType.

Przykłady

Poniższy kod pokazuje, jak uzyskać dostęp do tej właściwości i ustawić tę właściwość.

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

Uwagi

Wartość zwracana może być jednym z następujących elementów członkowskich wyliczenia:

Dotyczy