Can i set MSMQ security options from my code

K

Kimmo Laine

Hello,

can i set MSMQ security options from my code: I want that whenever i create
a new queue, certain rights ( open, read and sen ) are given to certain
group.


thx

Kimmo Laine
 
J

John Wadie

You may use something like this

using System.Messaging;

MessageQueue myQueue = MessageQueue.Create(@"machine1\myQueue");
myQueue.SetPermissions(@"domain\userName",MessageQueueAccessRights.FullContr
ol);

Cheers,
John Wadie
 
J

José Joye

You could play with the SetPermissions() method as below:


m_TransferQueue = MessageQueue.Create(QueueNameLocalFormat());
try
{
m_TransferQueue.SetPermissions("Administrators",
MessageQueueAccessRights.FullControl);
}
catch (Exception)
{
// blabla...
}

José
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MSMQ and user rights 1
Open existing MSMQ 4
MSMQ and the Message.Body property 0
Sending MSMQ from MFC based code 0
MSMQ message from VB 6 1
Resources 1
MSMQ Async Receive 3
MSMQ Permissions 3

Top