语言

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

适用于