ServiceSecurityAuditBehavior.AuditLogLocation Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the location where secure-related event logs are written.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public AuditLogLocation AuditLogLocation { get; set; }

Property Value

Type: System.ServiceModel.AuditLogLocation

The AuditLogLocation. The default value is Default.

Exception Condition
ArgumentOutOfRangeException

set and value are not valid members of AuditLogLocation.

To be able to write to AuditLogLocation.Security, the running thread (or process) must possess SeAuditPrivilege.

You can also set this value using the <serviceSecurityAudit> in a client application configuration file.

The following code creates an instance of the ServiceSecurityAuditBehavior class and sets this property.

// Create a new auditing behavior and set the log location.
ServiceSecurityAuditBehavior newAudit = 
    new ServiceSecurityAuditBehavior();
newAudit.AuditLogLocation = 
    AuditLogLocation.Application;

.NET Framework
Available since 3.0
Return to top
Show: