Specifies access rights for a trustee (user, group, or computer) to perform Message Queuing tasks.
Assembly: System.Messaging (in System.Messaging.dll)
Thetype exposes the following members.
|MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights)||Initializes a new instance of the class, granting the specified Message Queuing access rights to the specified trustee.|
|MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights, AccessControlEntryType)||Initializes a new instance of the class, with the specified trustee and Message Queuing access rights. The type of access (such as Allow or Deny) is defined by the entry type you pass in.|
|CustomAccessRights||Gets or sets custom access rights. (Inherited from AccessControlEntry.)|
|EntryType||Gets or sets a value that indicates how the access rights apply to the trustee. (Inherited from AccessControlEntry.)|
|GenericAccessRights||Gets or sets a set of common access rights that map to both standard and object-specific access rights for reading, writing, and executing. (Inherited from AccessControlEntry.)|
|MessageQueueAccessRights||Gets or sets the set of Message Queuing-specific rights to apply to the trustee.|
|StandardAccessRights||Gets or sets a set of standard access rights that correspond to operations common to most types of securable objects. (Inherited from AccessControlEntry.)|
|Trustee||Gets or sets the user, group, domain, or alias to which you are assigning access rights. (Inherited from AccessControlEntry.)|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
Use the class to specify rights to apply to a trustee. These rights include peeking, receiving, or sending messages; viewing or modifying queue properties or permissions; and deleting queues. The MessageQueue class's SetPermissions method provides overloads for passing an instance of this class directly into the method, or adding it to an instance of AccessControlList so that you can add rights for more than one trustee at a time. The new access right is appended to the end of the queue's discretionary access control list (DACL), which identifies the users and groups that can access the queue.
There are some exceptions to this generalization about where the new right is added and its effects. For more information, see System.Messaging.
An overload of the MessageQueueAccessControlEntry constructor allows you specify a AccessControlEntryType member to indicate whether to allow or deny rights to the trustee. The order in which rights are allowed or denied in the resource's DACL affects whether the trustee has the specified rights. For example, if rights have already been granted to the trustee and you later add an entry that denies them, the system finds the granted rights first, so the user is granted rights you might have intended they be denied. You can use two entry types to override this behavior: Set and Revoke. For more information about controlling the way in which access rights are determined, see the AccessControlEntryType enumeration topic.
The class is associated with security based on access control lists (ACLs), which you can use to give users access to the Message Queuing system itself. This is different from code access security, which is implemented through the MessageQueuePermission and related classes. Message Queuing code access security defines queue-specific operations or queue access that an application might require which is subject to security control; it does not represent a right for the application to perform these operations or receive access in and of itself. See the topic [<topic://cpconcodeaccesssecurity>] for more information about code access security.
To set message queue permissions for a trustee, create a new instance of the Trustee class and pass it into an overload of the #ctor constructor. Specify the message queue access rights either by passing an instance of MessageQueueAccessRights into the constructor or by setting the MessageQueueAccessRights property on an existing instance.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.