共用方式為


ServiceSecurityAuditBehavior.AuditLogLocation 屬性

定義

取得或設定寫入安全性相關事件記錄的位置。

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

屬性值

AuditLogLocation。 預設值是 Default

例外狀況

setvalue 不是 AuditLogLocation 的有效成員。

範例

下列程式碼會建立 ServiceSecurityAuditBehavior 類別的執行個體,並設定這個屬性。

// Create a new auditing behavior and set the log location.
ServiceSecurityAuditBehavior newAudit =
    new ServiceSecurityAuditBehavior();
newAudit.AuditLogLocation =
    AuditLogLocation.Application;
' Create a new auditing behavior and set the log location.
Dim newAudit As New ServiceSecurityAuditBehavior()
newAudit.AuditLogLocation = AuditLogLocation.Application

備註

若要能寫入 AuditLogLocation.Security,執行中的執行緒 (或處理序) 必須擁有 SeAuditPrivilege

您也可以在用戶端應用程式組態檔中使用< serviceSecurityAudit >來設定此值。

適用於