MessageSecurityOverTcp.ClientCredentialType Proprietà

Definizione

Specifica il tipo di credenziale client utilizzato dal client per l'autenticazione al servizio a livello 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

Valore della proprietà

Un oggetto MessageCredentialType. Il valore predefinito è Windows.

Eccezioni

Esempio

Il codice seguente illustra come accedere e impostare questa proprietà.

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

Commenti

Il valore restituito può essere uno dei membri di enumerazione seguenti:

Si applica a