This topic has not yet been rated - Rate this topic

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.

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)
public MessageQueueAccessControlEntry(
	Trustee trustee,
	MessageQueueAccessRights rights,
	AccessControlEntryType entryType
)

Parameters

trustee
Type: System.Messaging.Trustee

A Trustee that specifies a user, group, computer, domain, or alias.

rights
Type: System.Messaging.MessageQueueAccessRights

A bitwise combination of the MessageQueueAccessRights values which defines the combination of rights to grant to the trustee.

entryType
Type: System.Messaging.AccessControlEntryType

One of the AccessControlEntryType values, which specifies whether to allow, deny, set or revoke the specified rights.

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.