ObjectSecurity.SetAccessRuleProtection Method

Sets or removes protection of the access rules associated with this ObjectSecurity object. Protected access rules cannot be modified by parent objects through inheritance.

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)

public void SetAccessRuleProtection (
	bool isProtected,
	bool preserveInheritance
)
public void SetAccessRuleProtection (
	boolean isProtected, 
	boolean preserveInheritance
)
public function SetAccessRuleProtection (
	isProtected : boolean, 
	preserveInheritance : boolean
)
Not applicable.

Parameters

isProtected

true to protect the access rules associated with this ObjectSecurity object from inheritance; false to allow inheritance.

preserveInheritance

true to preserve inherited access rules; false to remove inherited access rules. This parameter is ignored if isProtected is false.

Exception typeCondition

InvalidOperationException

This method attempts to remove inherited rules from a non-canonical Discretionary Access Control List (DACL).

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: