MessageSecurityOverTcp.AlgorithmSuite 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 zestaw algorytmów, który ma być używany do zabezpieczania komunikatów na poziomie protokołu SOAP.
public:
property System::ServiceModel::Security::SecurityAlgorithmSuite ^ AlgorithmSuite { System::ServiceModel::Security::SecurityAlgorithmSuite ^ get(); void set(System::ServiceModel::Security::SecurityAlgorithmSuite ^ value); };
public System.ServiceModel.Security.SecurityAlgorithmSuite AlgorithmSuite { get; set; }
member this.AlgorithmSuite : System.ServiceModel.Security.SecurityAlgorithmSuite with get, set
Public Property AlgorithmSuite As SecurityAlgorithmSuite
Wartość właściwości
Klasa SecurityAlgorithmSuite. Wartość domyślna to Basic256.
Wyjątki
Wartość AlgorithmSuite to null.
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
Należy pamiętać o mocnych i słabych stronach odpowiednich algorytmów podczas wprowadzania modyfikacji tego ustawienia.
Jeśli ta właściwość zostanie ustawiona na wartość inną niż domyślna i wygenerujesz plik konfiguracji przy użyciu narzędzia ServiceModel Metadata Tool (Svcutil.exe), nie jest ona generowana poprawnie i musisz ręcznie edytować plik konfiguracji, aby ustawić odpowiedni atrybut konfiguracji na żądaną wartość.