This documentation is archived and is not being maintained.

ObjectSecurity.SetAuditRuleProtection Method

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

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

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

Parameters

isProtected

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

preserveInheritance

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

Exception typeCondition

InvalidOperationException

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

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
Show: