ServiceSecurityAuditBehavior.MessageAuthenticationAuditLevel Właściwość

Definicja

Pobiera lub ustawia typ zdarzeń uwierzytelniania do inspekcji na poziomie komunikatu.

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

Wartość właściwości

AuditLevel Jedna z wartości wyliczenia. Wartość domyślna to None.

Wyjątki

set i value nie są prawidłowymi członkami programu AuditLevel.

Przykłady

Poniższy kod tworzy wystąpienie ServiceSecurityAuditBehavior klasy i ustawia tę właściwość.

// Create a new auditing behavior and set the log location.
ServiceSecurityAuditBehavior newAudit =
    new ServiceSecurityAuditBehavior();
newAudit.AuditLogLocation =
    AuditLogLocation.Application;
newAudit.MessageAuthenticationAuditLevel =
    AuditLevel.SuccessOrFailure;
newAudit.ServiceAuthorizationAuditLevel =
    AuditLevel.SuccessOrFailure;
newAudit.MessageAuthenticationAuditLevel = _
    AuditLevel.SuccessOrFailure
newAudit.ServiceAuthorizationAuditLevel = _
    AuditLevel.SuccessOrFailure

Uwagi

Aplikacje usługi Windows Communication Foundation (WCF) mają dwa poziomy, na których można wymuszać zabezpieczenia. Na poziomie usługi wszystkie metody usługi są wymuszane przez te same zasady zabezpieczeń. Poszczególne metody w usłudze mogą mieć inne (bardziej rygorystyczne) zasady zabezpieczeń. Użyj właściwości , MessageAuthenticationAuditLevel aby kontrolować, które zdarzenia na poziomie komunikatów są poddawane inspekcji.

Tę wartość można również ustawić przy użyciu <elementu serviceSecurityAudit> w pliku konfiguracji aplikacji klienckiej.

Dotyczy