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