MessageSecurityOverTcp.AlgorithmSuite Egenskap

Definition

Anger den algoritmsvit som ska användas för att skydda meddelanden på SOAP-nivå.

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

Egenskapsvärde

En SecurityAlgorithmSuite. Standardvärdet är Basic256.

Undantag

Värdet AlgorithmSuite för är null.

Exempel

Följande kod visar hur du kommer åt och anger den här egenskapen.

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

Kommentarer

Du bör vara medveten om de relevanta algoritmernas styrkor och svagheter när du gör ändringar i den här inställningen.

Om du anger den här egenskapen till ett annat värde än standardvärdet och genererar en konfigurationsfil med hjälp av ServiceModel Metadata Utility Tool (Svcutil.exe), genereras den inte korrekt och du måste manuellt redigera konfigurationsfilen för att ange motsvarande konfigurationsattribut till önskat värde.

Gäller för