MessageSecurityOverTcp.ClientCredentialType Właściwość
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Określa typ poświadczeń klienta używany 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
Element MessageCredentialType. Wartość domyślna to Windows.
Wyjątki
Wartość ClientCredentialType elementu nie jest prawidłową MessageCredentialTypewartością .
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: