SymmetricSecurityBindingElement.MessageProtectionOrder Właściwość

Definicja

Pobiera lub ustawia kolejność szyfrowania komunikatów i podpisywania dla tego powiązania.

public:
 property System::ServiceModel::Security::MessageProtectionOrder MessageProtectionOrder { System::ServiceModel::Security::MessageProtectionOrder get(); void set(System::ServiceModel::Security::MessageProtectionOrder value); };
public System.ServiceModel.Security.MessageProtectionOrder MessageProtectionOrder { get; set; }
member this.MessageProtectionOrder : System.ServiceModel.Security.MessageProtectionOrder with get, set
Public Property MessageProtectionOrder As MessageProtectionOrder

Wartość właściwości

MessageProtectionOrder

Określa MessageProtectionOrder sposób ochrony komunikatu. Wartość domyślna to SignBeforeEncrypt.

Wyjątki

set i value jest niezdefiniowany.

Przykłady

Poniższy kod pokazuje, jak ustawić tę właściwość.

// Create a SymmetricSecurityBindingElement.
SymmetricSecurityBindingElement ssbe =
    new SymmetricSecurityBindingElement();

// Set the algorithm suite to one that uses 128-bit keys.
ssbe.DefaultAlgorithmSuite = SecurityAlgorithmSuite.Basic128;

   // Set MessageProtectionOrder to SignBeforeEncrypt.
ssbe.MessageProtectionOrder = MessageProtectionOrder.SignBeforeEncrypt;

Uwagi

Uwaga

Jeśli w komunikacie, który jest zaszyfrowany, element podpisu nie jest szyfrowany nawet wtedy, gdy MessageProtectionOrder właściwość jest ustawiona na SignBeforeEncryptAndEncryptSignature. Takie zachowanie występuje nawet w przypadku powiązań dostarczanych przez system. Jednak WSDL wygenerowany przez usługę <sp:EncryptSignature> WCF nadal zawiera asercji.

Aby zapoznać się z listą członków i ich opisów, zobacz MessageProtectionOrder.

Dotyczy