PipeSecurity.RemoveAuditRule(PipeAuditRule) Method

Definition

Removes an audit rule from the System Access Control List (SACL) that is associated with the current PipeSecurity object.

public bool RemoveAuditRule (System.IO.Pipes.PipeAuditRule rule);

Parameters

rule
PipeAuditRule

The audit rule to remove.

Returns

true if the audit rule was removed; otherwise, false.

Exceptions

The rule parameter is null.

Remarks

The RemoveAuditRule method removes either all matching Deny audit rules or all matching Allow audit rules from the current PipeSecurity object. For example, you can use this method to remove all Deny audit rules for a user by passing a FileSystemAuditRule object created using the Deny value, the Failure value, and a user account. When you do this, the RemoveAuditRule method removes any deny rules that specify the Failure value or the Success value.

Applies to

Product Versions
.NET Core 1.1, 6, 7, 8, 9
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5