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> 设置此值。

适用于