System.Security.AccessControl.FileSystemSecurity.RemoveAuditRuleSpecific Method

Removes a single matching allow or deny audit rule from the current file or directory.

Syntax

public void RemoveAuditRuleSpecific (FileSystemAuditRule rule)

Parameters

rule
A System.Security.AccessControl.FileSystemAuditRule object that represents an audit rule to remove from a file or directory.

Remarks

The FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) method removes the specified matching AccessControlType.Deny audit rule or the specified matching AccessControlType.Allow audit rule from the current System.Security.AccessControl.FileSystemSecurity object. For example, you can use this method to remove a specified AccessControlType.Deny audit rule for a user by passing a System.Security.AccessControl.FileSystemAuditRule object created using the AccessControlType.Deny value, the AuditFlags.Failure value, and a user account. When you do this, the FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) method removes only a deny rule that specifies the AuditFlags.Failure value. It does not remove any deny rules that specify the AuditFlags.Success value.

Requirements

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0