語言

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。

例外狀況

set 且 value 並非 的 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> 來設定這個值。

適用於