MessageSecurityOverTcp.ClientCredentialType Proprietà

Definizione

Specifica il tipo di credenziale client utilizzato dal client per autenticarsi presso il 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à

Oggetto MessageCredentialType. Il valore predefinito è Windows.

Eccezioni

Il valore della proprietà ClientCredentialType non è un valore valido dell'enumerazione MessageCredentialType.

Esempio

Nel codice seguente viene illustrato come accedere a questa proprietà e come impostarla.

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 seguenti membri dell'enumerazione:

Si applica a