ModifyAccessRule Method
.NET Framework Class Library
ObjectSecurity..::.ModifyAccessRule Method

Applies the specified modification to the Discretionary Access Control List (DACL) associated with this ObjectSecurity object.

Namespace:  System.Security.AccessControl
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Overridable Function ModifyAccessRule ( _
    modification As AccessControlModification, _
    rule As AccessRule, _
    <OutAttribute> ByRef modified As Boolean _
) As Boolean
Visual Basic (Usage)
Dim instance As ObjectSecurity
Dim modification As AccessControlModification
Dim rule As AccessRule
Dim modified As Boolean
Dim returnValue As Boolean

returnValue = instance.ModifyAccessRule(modification, _
    rule, modified)
C#
public virtual bool ModifyAccessRule(
    AccessControlModification modification,
    AccessRule rule,
    out bool modified
)
Visual C++
public:
virtual bool ModifyAccessRule(
    AccessControlModification modification, 
    AccessRule^ rule, 
    [OutAttribute] bool% modified
)
JScript
public function ModifyAccessRule(
    modification : AccessControlModification, 
    rule : AccessRule, 
    modified : boolean
) : boolean

Parameters

modification
Type: System.Security.AccessControl..::.AccessControlModification
The modification to apply to the DACL.
rule
Type: System.Security.AccessControl..::.AccessRule
The access rule to modify.
modified
Type: System..::.Boolean%
true if the DACL is successfully modified; otherwise, false.

Return Value

Type: System..::.Boolean
true if the DACL is successfully modified; otherwise, false.

To avoid unintentionally allowing access to principals, applications should check for the existence of an allow everyone full access (AEFA) access control entry (ACE) and remove it before modifying a DACL.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
Page view tracker