Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FileSystemSecurity.SetAuditRule Method (FileSystemAuditRule)

Sets the specified audit rule for the current file or directory.

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

public void SetAuditRule (
	FileSystemAuditRule rule
)
public void SetAuditRule (
	FileSystemAuditRule rule
)
public function SetAuditRule (
	rule : FileSystemAuditRule
)
Not applicable.

Parameters

rule

A FileSystemAuditRule object that represents an audit rule to set for a file or directory.

Exception typeCondition

ArgumentNullException

The rule parameter is a null reference (Nothing in Visual Basic).

The SetAuditRule method adds the specified audit rule or overwrites any identical audit rules that match the FileSystemRights value of the rule parameter. For example, if the rule parameter specifies a Read value and the SetAuditRule method finds an identical audit rule that specifies the Read value, the identical rule will be overwritten. If the SetAuditRule method finds an identical audit rule that specifies the Write value, the identical rule will not be overwritten.

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.