PipeAuditRule 类


表示访问控制项 (ACE) 的抽象,该访问控制项定义了管道的审核规则。Represents an abstraction of an access control entry (ACE) that defines an audit rule for a pipe.

public ref class PipeAuditRule sealed : System::Security::AccessControl::AuditRule
public sealed class PipeAuditRule : System.Security.AccessControl.AuditRule
type PipeAuditRule = class
    inherit AuditRule
Public NotInheritable Class PipeAuditRule
Inherits AuditRule


审核规则确定何时以及如何记录对系统对象执行的操作。Audit rules determine when and how actions performed on system objects are logged.

PipeAuditRule类表示基础访问控制项 (ACE) 的抽象, 该访问控制项指定用户帐户、要提供的访问类型 (读取、写入等) 以及是否执行审核。The PipeAuditRule 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 specify how audit rules are inherited from and propagated to objects.

若要允许在运行 Windows NT 或更高版本操作系统的计算机上进行文件审核, 必须启用审核访问安全策略;默认情况下, 此策略设置为 "无审核"。To allow file auditing on computers that are running Windows NT or later operating systems, the Audit Access Security policy must be enabled; by default, this policy is set to No Auditing.

若要启用审核访问安全策略, 请执行以下步骤:To enable the Audit Access Security policy, perform the following steps:

  1. 单击 "启动" 按钮, 然后指向 "所有程序"。Click the Start button and then point to All Programs. 指向 "管理工具", 然后单击 "本地安全策略"。Point to Administrative Tools and then click Local Security Policy.

  2. 在 "本地安全设置" 窗口中, 展开 "本地策略" 文件夹, 然后单击 "审核策略" 文件夹。In the Local Security Settings window, expand the Local Policies folder and left-click the Audit Policy folder.

  3. 在 "本地安全设置" 窗口的右窗格中, 双击 "审核对象访问" 项以显示 "审核对象访问属性" 对话框。Double-click the Audit object access entry in the right pane of the Local Security Settings window to display the Audit object access Properties dialog box.

  4. 选择 "成功" 或 "失败" 框以记录成功或失败。Select the Success or Failure 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.

PipeAuditRule使用类创建新的审核规则。Use the PipeAuditRule class to create a new audit rule. 可以使用PipeSecurity类来持久保存此规则。You can persist this rule using the PipeSecurity class.


PipeAuditRule(IdentityReference, PipeAccessRights, AuditFlags)

PipeAuditRule 对象中指定的用户帐户初始化 IdentityReference 类的一个新实例。Initializes a new instance of the PipeAuditRule class for a user account specified in a IdentityReference object.

PipeAuditRule(String, PipeAccessRights, AuditFlags)

为命名的用户帐户初始化 PipeAuditRule 类的一个新实例。Initializes a new instance of the PipeAuditRule class for a named user account.



获取此规则的访问掩码。Gets the access mask for this rule.

(继承自 AuthorizationRule)

获取此审核规则的审核标志。Gets the audit flags for this audit rule.

(继承自 AuditRule)

获取对其应用此规则的 IdentityReferenceGets the IdentityReference to which this rule applies.

(继承自 AuthorizationRule)

获取用于确定子对象如何继承此规则的标志的值。Gets the value of flags that determine how this rule is inherited by child objects.

(继承自 AuthorizationRule)

获取一个值,该值指示此规则是否为显式设置或继承自父级容器对象。Gets a value indicating whether this rule is explicitly set or is inherited from a parent container object.

(继承自 AuthorizationRule)

获取与当前 PipeAccessRights 对象关联的 PipeAuditRule 标志。Gets the PipeAccessRights flags that are associated with the current PipeAuditRule object.


获取传播标志的值,该值确定如何将此规则的继承传播到子对象。Gets the value of the propagation flags, which determine how inheritance of this rule is propagated to child objects. 仅当 InheritanceFlags 枚举的值不为 None 时,此属性才有意义。This property is significant only when the value of the InheritanceFlags enumeration is not None.

(继承自 AuthorizationRule)



确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)