ServiceSecurityAuditBehavior Class
Specifies the audit behavior of security events. In general, the security events consist of authentication events such as transport, message or negotiate authentication and authorization event. For more information, seeServiceAuthorizationManager.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The ServiceSecurityAuditBehavior type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ServiceSecurityAuditBehavior | Initializes a new instance of the ServiceSecurityAuditBehavior class. |
| Name | Description | |
|---|---|---|
![]() | AuditLogLocation | Gets or sets the location where secure-related event logs are written. |
![]() | MessageAuthenticationAuditLevel | Gets or sets the type of authentication events to audit at the message level. |
![]() | ServiceAuthorizationAuditLevel | Gets or sets the type of authorization events to audit at the service level. |
![]() | SuppressAuditFailure | Gets or sets a value that indicates whether failure to audit affects the application. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IServiceBehavior::AddBindingParameters | Passes custom data to binding elements to support the contract implementation. |
![]() ![]() | IServiceBehavior::ApplyDispatchBehavior | Provides the ability to change run-time property values or insert custom extension objects such as error handlers, message or parameter interceptors, security extensions, and other custom extension objects. |
![]() ![]() | IServiceBehavior::Validate | Not implemented. |
The ServiceSecurityAuditBehavior class is used to audit authentication events. When auditing is enabled, either successful or failed authentication attempts (or both) can be audited. The events are written to one of three event logs: application, security, or the default log for the operating system version. The event logs can all be viewed using the Windows Event viewer.
Use this class to specify which event log is written to, as well as kinds of authentication events to write. You can also specify whether to suppress audit failures by setting the SuppressAuditFailure property to false (the default is true).
For more information about auditing security events for applications, see Auditing Security Events.
To specify audit behavior in configuration, use the <serviceSecurityAudit> element.
The following code creates an instance of the ServiceHost class and adds a new ServiceSecurityAuditBehavior to its collection of behaviors.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
