mscorlib 2.0.0.0 4.0.0.0 System.Security.AccessControl.AuditRule

The class represents an abstraction of an underlying access control entry (ACE) that specifies a user account, the type of access to provide (read, write, and so on), and whether to perform auditing. This class can also specify how audit rules are inherited from and propagated to objects.

To permit file and directory auditing on Windows NT or later, you must enable Audit Access Security policy on your machine. By default, this policy is set to No Auditing.

To enable the Audit Access Security policy, perform the following steps:

Open the Local Security Settings Microsoft Management Console (MMC) snap-in, located in the Administrative Tools folder.

Expand the Local Policies folder and left-click the Audit Policy folder.

Double-click the Audit object access entry on the right pane of the MMC snap-in, or right-click and choose Properties to display the Audit object access properties dialog box.

Select the Success or Failure check boxes to log successes or failures.

Note that an audit rule for a user account requires a corresponding access rule for the same user account.

Use the class to create a new audit rule. You can persist this rule using the or class.

Represents an abstraction of an access control entry (ACE) that defines an audit rule for a file or directory. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create an audit rule that you can persist using the or class. Audit rules determine when and how actions performed on system objects, such as files and folders, are logged.

  Initializes a new instance of the class using a reference to a user account, a value that specifies the type of operation associated with the audit rule, and a value that specifies when to perform auditing.

  An object that encapsulates a reference to a user account.
  One of the values that specifies the type of operation associated with the audit rule.
  One of the values that specifies when to perform auditing.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create an audit rule that you can persist using the or class. Audit rules determine when and how actions performed on system objects, such as files and folders, are logged.

  The parameter must identify a valid account on the current computer or domain. The string takes the following form, where is the name of a valid domain or computer name and is the name of a valid user account on a domain or computer: .

  Initializes a new instance of the class using a user account name, a value that specifies the type of operation associated with the audit rule, and a value that specifies when to perform auditing.

  The name of a user account.
  One of the values that specifies the type of operation associated with the audit rule.
  One of the values that specifies when to perform auditing.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create an audit rule that you can persist using the or class. Audit rules determine when and how actions performed on system objects, such as files and folders, are logged.

  Initializes a new instance of the class using the name of a reference to a user account, a value that specifies the type of operation associated with the audit rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies when to perform auditing.

  An object that encapsulates a reference to a user account.
  One of the values that specifies the type of operation associated with the audit rule.
  One of the values that specifies how access masks are propagated to child objects.
  One of the values that specifies how Access Control Entries (ACEs) are propagated to child objects.
  One of the values that specifies when to perform auditing.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create an audit rule that you can persist using the or class. Audit rules determine when and how actions performed on system objects, such as files and folders, are logged.

  The parameter must identify a valid account on the current computer or domain. The string takes the following form, where is the name of a valid domain or computer name and is the name of a valid user account on a domain or computer: .

  Initializes a new instance of the class using the name of a user account, a value that specifies the type of operation associated with the audit rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies when to perform auditing.

  The name of a user account.
  One of the values that specifies the type of operation associated with the audit rule.
  One of the values that specifies how access masks are propagated to child objects.
  One of the values that specifies how Access Control Entries (ACEs) are propagated to child objects.
  One of the values that specifies when to perform auditing.
- Property
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.FileSystemRights To be added. To be added.

  Gets the flags associated with the current object.