mscorlib 2.0.0.0 4.0.0.0 System.Security.AccessControl.NativeObjectSecurity

The class is the base class for the and classes. These classes represent all of the access rights for a system file or directory and define how access attempts are audited.

The class represents access and audit rights as a set of rules. Each access rule is represented by a object, while each audit rule is represented by a object.

The class is an abstraction of the underlying Microsoft Windows file security system. In this system, each file or directory has a discretionary access control list (DACL), which controls access to the file or directory, and a system access control list (SACL), which specifies the access control attempts that are audited. The and classes are abstractions of access control entries (ACEs) that comprise DACLs and SACLs.

The class hides many of details of DACLs and SACLs; you do not have to worry about ACE ordering or null DACLS.

To persist new or changed access control list (ACL) information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

Represents the access control and audit security for a file or directory.

- Property
  2.0.0.0
  4.0.0.0
  System.Type To be added.

  Classes that derive from the class override the property and return the type they use to represent access rights. When you work with arrays or collections that contain multiple types of security objects, use this property to determine the correct enumeration type to use with each security object.

  Gets the enumeration that the class uses to represent access rights.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.AccessRule `` `` `` `` `` ``

  The recommended way to create access control rules is to use the constructors of the class.

  The return type of the method is the base class, , but the return value can be cast safely to the derived class.

  Initializes a new instance of the class that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.

  A new object that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.

  An object that represents a user account. An integer that specifies an access type. true if the access rule is inherited; otherwise, false. One of the values that specifies how to propagate access masks to child objects. One of the values that specifies how to propagate Access Control Entries (ACEs) to child objects. One of the values that specifies whether access is allowed or denied.
- Property
  2.0.0.0
  4.0.0.0
  System.Type To be added.

  Classes that derive from the class override the property and return the type they use to represent access rules. When you work with arrays or collections that contain multiple types of security objects, use this property to determine the correct access rule type to use with each security object.

  Gets the enumeration that the class uses to represent access rules.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method adds a new rule to the list of rules contained within a object.

  If an access control list (ACL) already exists for the specified rule, the method will still add the rule, with one exception: a object created using the enumeration value supersedes an object created using the enumeration value.

  To persist new or changed ACL information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  When you add an access rule without setting the flag, the flag will be automatically added to your rule. If you remove the rule later without specifying the flag, the flag will automatically be removed.

  Adds the specified access control list (ACL) permission to the current file or directory.

  A object that represents an access control list (ACL) permission to add to a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method adds a new audit rule to the list of rules contained within a object.

  If an audit rule already exists for the specified rule, the method will still add the rule.

  Adds the specified audit rule to the current file or directory.

  A object that represents an audit rule to add to a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.AuditRule `` `` `` `` `` ``

  The recommended way to create audit rules is to use the constructors of the class.

  The return type of the method is the base class, , but the return value can be cast safely to the derived class.

  Initializes a new instance of the class representing the specified audit rule for the specified user.

  A new object representing the specified audit rule for the specified user.

  An object that represents a user account. An integer that specifies an access type. true if the access rule is inherited; otherwise, false. One of the values that specifies how to propagate access masks to child objects. One of the values that specifies how to propagate Access Control Entries (ACEs) to child objects. One of the values that specifies the type of auditing to perform.
- Property
  2.0.0.0
  4.0.0.0
  System.Type To be added.

  Classes that derive from the class override the property and return the type they use to represent audit rights. When you work with arrays or collections that contain multiple types of security objects, use this property to determine the correct audit rule type to use with each security object.

  Gets the type that the class uses to represent audit rules.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method removes either all matching access rules or all matching access rules from the current object. For example, you can use this method to remove all access rules for a user by passing a object created using the value, the value, and a user account. When you do this, the method removes any deny rules that specify the value or the value.

  To persist new or changed access control list (ACL) information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  When you add an access rule without setting the flag, the flag will be automatically added to your rule. If you remove the rule later without specifying the flag, the flag will automatically be removed.

  Removes all matching allow or deny access control list (ACL) permissions from the current file or directory.

  true if the access rule was removed; otherwise, false.

  A object that represents an access control list (ACL) permission to remove from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method removes all access control list (ACL) permissions for the specified user. The method ignores all values in the object except the user account.

  To persist new or changed ACL information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  When you add an access rule without setting the flag, the flag will be automatically added to your rule. If you remove the rule later without specifying the flag, the flag will automatically be removed.

  Removes all access control list (ACL) permissions for the specified user from the current file or directory.

  A object that specifies a user whose access control list (ACL) permissions should be removed from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method removes the specified access rule or the specified matching access rule from the current object. For example, you can use this method to remove a specified access rule for a user by passing a object created using the value, the value, and a user account. When you do this, the method removes only the deny rule that specifies the value. It does not remove any deny rules that specify the value.

  To persist new or changed access control list (ACL) information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  When you add an access rule without setting the flag, the flag will be automatically added to your rule. If you remove the rule later without specifying the flag, the flag will automatically be removed.

  Removes a single matching allow or deny access control list (ACL) permission from the current file or directory.

  A object that specifies a user whose access control list (ACL) permissions should be removed from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method removes either all matching audit rules or all matching audit rules from the current object. For example, you can use this method to remove all audit rules for a user by passing a object created using the value, the value, and a user account. When you do this, the method removes any deny rules that specify the value or the value.

  Removes all matching allow or deny audit rules from the current file or directory.

  true if the audit rule was removed; otherwise, false

  A object that represents an audit rule to remove from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method removes all audit rules for the specified user. It ignores all values in the object except the user account.

  Removes all audit rules for the specified user from the current file or directory.

  A object that specifies a user whose audit rules should be removed from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method removes the specified matching audit rule or the specified matching audit rule from the current object. For example, you can use this method to remove a specified audit rule for a user by passing a object created using the value, the value, and a user account. When you do this, the method removes only a deny rule that specifies the value. It does not remove any deny rules that specify the value.

  Removes a single matching allow or deny audit rule from the current file or directory.

  A object that represents an audit rule to remove from a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method adds the specified access control list (ACL) rule or overwrites any identical ACL rules that match the parameter. For example, if the parameter specifies a value and the method finds an identical ACL rule that specifies the value, the identical rule will be overwritten. If the method finds an identical ACL rule that specifies the value, the identical rule will also be overwritten.

  To persist new or changed ACL information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  Adds the specified access control list (ACL) permission to the current file or directory and removes all matching ACL permissions.

  A object that represents an access control list (ACL) permission to add to a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method adds the specified access control list (ACL) rule or overwrites any identical ACL rules that match the value of the parameter. For example, if the parameter specifies a value and the method finds an identical ACL rule that specifies the value, the identical rule will be overwritten. If the method finds an identical ACL rule that specifies the value, the identical rule will not be overwritten.

  To persist new or changed ACL information to a file, use the or method. To persist new or changed ACL information to a directory, use the or method.

  To retrieve ACL information from a file, use the or method. To retrieve ACL information from a directory, use the or method.

  Sets the specified access control list (ACL) permission for the current file or directory.

  A object that represents an access control list (ACL) permission to set for a file or directory.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

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

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

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