This topic has not yet been rated - Rate this topic

SemaphoreAuditRule Constructor

Initializes a new instance of the SemaphoreAuditRule class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.

Namespace:  System.Security.AccessControl
Assembly:  System (in System.dll)
public SemaphoreAuditRule(
	IdentityReference identity,
	SemaphoreRights eventRights,
	AuditFlags flags


Type: System.Security.Principal.IdentityReference

The user or group the rule applies to. Must be of type SecurityIdentifier or a type such as NTAccount that can be converted to type SecurityIdentifier.

Type: System.Security.AccessControl.SemaphoreRights

A bitwise combination of SemaphoreRights values specifying the kinds of access to audit.

Type: System.Security.AccessControl.AuditFlags

A bitwise combination of AuditFlags values specifying whether to audit success, failure, or both.


eventRights specifies an invalid value.


flags specifies an invalid value.


identity is null.


eventRights is zero.


identity is neither of type SecurityIdentifier nor of a type such as NTAccount that can be converted to type SecurityIdentifier.

To create an NTAccount object from a string representing a user or group name, use the NTAccount.NTAccount(String) constructor.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.