Editar

Compartir a través de


ServiceSecurityAuditBehavior.AuditLogLocation Property

Definition

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

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

Property Value

The AuditLogLocation. The default value is Default.

Exceptions

set and value are not valid members of AuditLogLocation.

Examples

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;
' Create a new auditing behavior and set the log location.
Dim newAudit As New ServiceSecurityAuditBehavior()
newAudit.AuditLogLocation = AuditLogLocation.Application

Remarks

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.

Applies to