ServiceSecurityAuditBehavior.AuditLogLocation 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定安全相關事件日誌的撰寫位置。
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> 來設定這個值。