473,379 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Can i set MSMQ security options from my code

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
Nov 16 '05 #1
2 4934
You may use something like this

using System.Messaging;

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

Cheers,
John Wadie

Nov 16 '05 #2
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é
"Kimmo Laine" <reply.to@newsgroup> wrote in message
news:eh**************@TK2MSFTNGP15.phx.gbl...
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

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew Gordon | last post by:
I'm investigating getting Microsoft Navision to do stuff from a Python script. The recommended way seems to be to use message queues (MSMQ). I can get Navision to send a message to itself fine. I...
6
by: Bryce | last post by:
In reference to Q173339, this code works fine if accessing a local queue on the same Server as the IIS is running, but fails if accessing a remote queue I have provided credentials via Anonymous...
8
by: SunshineGirl | last post by:
I'm trying to trigger an app with the following code from a message queue. It works with only the message box voilà! enabled. But it causes the exception below when it is triggered with the rest of...
2
by: Nikhil | last post by:
I have an MSMQ dll created in C# when called through a C# windows form application it works fine but when I call it using an ASP page I get an error while trying to send a message attached the...
5
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via...
1
by: Richard Atkinson | last post by:
I would appreciate help on the Microsoft Message Queue. Basically I would like to Serialize an entire class into a message queue and then reinstantiate the class in another application from the...
11
by: Jon Davis | last post by:
Can a solution built in C# utilize MSMQ and/or MTS? If so, does this make the training material I already have on MSMQ and MTS in the context of VB6 an appropriate prerequisite foundation before...
2
by: SammyBar | last post by:
Hi all, I'm trying to send a message from ASP.NET to another PC by using MSMQ. I created my ASP.NET project by using Visual Studio 2005 but I initially set the project to be located on the File...
0
by: shakthi | last post by:
Actually,I have problem with message queuing. I wrote simple service and client that communicate through endpoint that works with netMsmqBinding. Exception occurs when client sends message to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.