MessageQueueAccessControlEntry Constructor (Trustee, MessageQueueAccessRights, AccessControlEntryType)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Available since 1.1
Return to top
Show: