語言

ServiceSecurityAuditBehavior.SuppressAuditFailure 屬性

定義

取得或設定一個值,指示未審核是否會影響應用程式。

public:
 property bool SuppressAuditFailure { bool get(); void set(bool value); };
public bool SuppressAuditFailure { get; set; }
member this.SuppressAuditFailure : bool with get, set
Public Property SuppressAuditFailure As Boolean

屬性值

true若未審核不影響申請;否則,。 false 預設值為 true。

範例

以下程式碼建立該 ServiceSecurityAuditBehavior 類別的實例並設定此屬性。

// 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.SuppressAuditFailure = false;
newAudit.SuppressAuditFailure = False

備註

若此屬性為 false,則未審核會拋出例外,導致使用者請求失敗。

你也可以在客戶端應用程式的設定檔中使用 <serviceSecurityAudit> 來設定這個值。

適用於