.NET Framework Class Library
ObjectSecurity.SetAuditRuleProtection Method

Note: This method is new in the .NET Framework version 2.0.

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)

Syntax

Visual Basic (Declaration)
Public Sub SetAuditRuleProtection ( _
    isProtected As Boolean, _
    preserveInheritance As Boolean _
)
Visual Basic (Usage)
Dim instance As ObjectSecurity
Dim isProtected As Boolean
Dim preserveInheritance As Boolean

instance.SetAuditRuleProtection(isProtected, preserveInheritance)
C#
public void SetAuditRuleProtection (
    bool isProtected,
    bool preserveInheritance
)
C++
public:
void SetAuditRuleProtection (
    bool isProtected, 
    bool preserveInheritance
)
J#
public void SetAuditRuleProtection (
    boolean isProtected, 
    boolean preserveInheritance
)
JScript
public function SetAuditRuleProtection (
    isProtected : boolean, 
    preserveInheritance : boolean
)

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.

Exceptions

Exception typeCondition

>InvalidOperatorException

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

Platforms

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Framework

Supported in: 2.0
See Also

Tags :


Page view tracker