MessageQueueAccessControlEntry Constructor (Trustee, MessageQueueAccessRights, AccessControlEntryType)
Initializes a new instance of the MessageQueueAccessControlEntry 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.
Assembly: System.Messaging (in System.Messaging.dll)
public MessageQueueAccessControlEntry( Trustee trustee, MessageQueueAccessRights rights, AccessControlEntryType entryType )
- Type: System.Messaging.Trustee
A Trustee that specifies a user, group, computer, domain, or alias.
- Type: System.Messaging.MessageQueueAccessRights
A bitwise combination of the MessageQueueAccessRights values which defines the combination of rights to grant to the trustee.
Use this overload of the constructor to grant or deny rights to the specified trustee. The rights you specify in the rights parameter are a bitwise combination of members of the MessageQueueAccessRights bitflag, which includes such rights as receiving messages, deleting queues, and setting queue properties. The constructor uses the rights you pass in to set this instance's MessageQueueAccessRights property.
For more information about granting or denying rights, see the AccessControlEntryType topic. For two members, Allow and Deny, there may be preexisting and possibly contradictory access rights, so the order in which the rights appear in the queue's discretionary access control list (DACL) affects whether the right is ultimately granted. Two other members, Set and Revoke, overwrite any existing rights. Use the member whose behavior is applicable to your application.
Pass this instance of MessageQueueAccessControlEntry directly into an overload of the SetPermissions method to grant or deny rights only to this trustee, or add this instance to a AccessControlList before calling SetPermissions to grant or deny rights to multiple trustees at once.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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.