PipeSecurity.RemoveAccessRule Method (PipeAccessRule)

 

Removes an access rule from the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object.

Namespace:   System.IO.Pipes
Assembly:  System.Core (in System.Core.dll)

public bool RemoveAccessRule(
	PipeAccessRule rule
)

Parameters

rule
Type: System.IO.Pipes.PipeAccessRule

The access rule to remove.

Return Value

Type: System.Boolean

true if the operation is successful; otherwise, false.

Exception Condition
ArgumentNullException

The rule parameter is null.

The RemoveAccessRule method removes either all matching Deny access rules or all matching Allow access rules from the current PipeSecurity object. For example, you can use this method to remove all Deny access rules for a user by passing a PipeAccessRule object created using the Deny value, the Read value, and a user account. The RemoveAccessRule method removes any deny rules that specify the Read value or the Write value.

.NET Framework
Available since 3.5
Return to top
Show: