ServiceSecurityAuditBehavior.ServiceAuthorizationAuditLevel Właściwość

Definicja

Pobiera lub ustawia typ zdarzeń autoryzacji do inspekcji na poziomie usługi.

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

Wartość właściwości

AuditLevel

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

Wyjątki

seti value są nieprawidłowymi członkami .AuditLevel Wartość domyślna to None.

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ług 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 , ServiceAuthorizationAuditLevel aby kontrolować, które zdarzenia poziomu usług są poddawane inspekcji.

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

Dotyczy