473,412 Members | 4,519 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,412 software developers and data experts.

MSMQ workgroup and C#

My MSMQ is in workgroup installation.

I tried to add an event handler for the ReceiveCompleted event and to do
It I try to use the SetPermissions. but I get an error of

“A workgroup installation computer dose not support the operation”

The code is:

MessageQueue myQueue = new MessageQueue(".\\myQueue");
System.Messaging.Trustee trustee = new Trustee(@".\\myQueue");
MessageQueueAccessControlEntry ace = new
MessageQueueAccessControlEntry(trustee,System.Mess aging.MessageQueueAccessRights.FullControl);

myQueue.SetPermissions(ace); // Error here!!!

myQueue.Formatter = new XmlMessageFormatter(new type[]{typeof(String)});

// Add an event handler for the ReceiveCompleted event.
myQueue.ReceiveCompleted += new
ReceiveCompletedEventHandler(MyReceiveCompleted); // Error here too!!!

// Begin the asynchronous receive operation.
myQueue.BeginReceive();

Does anyone know how to pass this problem?

Moti Saba
Nov 16 '05 #1
4 11808
Moti,

It could be that is an incorrect message. Do you have the rights to
change the access permissions on the queue? Also, what version of MSMQ are
you running (please don't say the one from option pack 4)?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MSMQ workgroup and C#" <MSMQ workgroup and C#@discussions.microsoft.com>
wrote in message news:B3**********************************@microsof t.com...
My MSMQ is in workgroup installation.

I tried to add an event handler for the ReceiveCompleted event and to do
It I try to use the SetPermissions. but I get an error of

"A workgroup installation computer dose not support the operation"

The code is:

MessageQueue myQueue = new MessageQueue(".\\myQueue");
System.Messaging.Trustee trustee = new Trustee(@".\\myQueue");
MessageQueueAccessControlEntry ace = new
MessageQueueAccessControlEntry(trustee,System.Mess aging.MessageQueueAccessRights.FullControl);

myQueue.SetPermissions(ace); // Error here!!!

myQueue.Formatter = new XmlMessageFormatter(new type[]{typeof(String)});

// Add an event handler for the ReceiveCompleted event.
myQueue.ReceiveCompleted += new
ReceiveCompletedEventHandler(MyReceiveCompleted); // Error here too!!!

// Begin the asynchronous receive operation.
myQueue.BeginReceive();

Does anyone know how to pass this problem?

Moti Saba

Nov 16 '05 #2
You have to use direct format names in workgroup mode when writing/reading
from public queues.
Something like this will do:

string mqPath = @"FormatName:DIRECT=OS:.\myQueue";
myQueue = new MessageQueue();
myQueue .Path=mqPath;
....

Willy.

"MSMQ workgroup and C#" <MSMQ workgroup and C#@discussions.microsoft.com>
wrote in message news:B3**********************************@microsof t.com...
My MSMQ is in workgroup installation.

I tried to add an event handler for the ReceiveCompleted event and to do
It I try to use the SetPermissions. but I get an error of

"A workgroup installation computer dose not support the operation"

The code is:

MessageQueue myQueue = new MessageQueue(".\\myQueue");
System.Messaging.Trustee trustee = new Trustee(@".\\myQueue");
MessageQueueAccessControlEntry ace = new
MessageQueueAccessControlEntry(trustee,System.Mess aging.MessageQueueAccessRights.FullControl);

myQueue.SetPermissions(ace); // Error here!!!

myQueue.Formatter = new XmlMessageFormatter(new type[]{typeof(String)});

// Add an event handler for the ReceiveCompleted event.
myQueue.ReceiveCompleted += new
ReceiveCompletedEventHandler(MyReceiveCompleted); // Error here too!!!

// Begin the asynchronous receive operation.
myQueue.BeginReceive();

Does anyone know how to pass this problem?

Moti Saba

Nov 16 '05 #3
Hi Willy

This was the problem!
You save me….

Thank you truly for your help.

Moti
"Willy Denoyette [MVP]" wrote:
You have to use direct format names in workgroup mode when writing/reading
from public queues.
Something like this will do:

string mqPath = @"FormatName:DIRECT=OS:.\myQueue";
myQueue = new MessageQueue();
myQueue .Path=mqPath;
....

Willy.

"MSMQ workgroup and C#" <MSMQ workgroup and C#@discussions.microsoft.com>
wrote in message news:B3**********************************@microsof t.com...
My MSMQ is in workgroup installation.

I tried to add an event handler for the ReceiveCompleted event and to do
It I try to use the SetPermissions. but I get an error of

"A workgroup installation computer dose not support the operation"

The code is:

MessageQueue myQueue = new MessageQueue(".\\myQueue");
System.Messaging.Trustee trustee = new Trustee(@".\\myQueue");
MessageQueueAccessControlEntry ace = new
MessageQueueAccessControlEntry(trustee,System.Mess aging.MessageQueueAccessRights.FullControl);

myQueue.SetPermissions(ace); // Error here!!!

myQueue.Formatter = new XmlMessageFormatter(new type[]{typeof(String)});

// Add an event handler for the ReceiveCompleted event.
myQueue.ReceiveCompleted += new
ReceiveCompletedEventHandler(MyReceiveCompleted); // Error here too!!!

// Begin the asynchronous receive operation.
myQueue.BeginReceive();

Does anyone know how to pass this problem?

Moti Saba


Nov 16 '05 #4
Hi Nicholas

I have the rights to change the access permissions on the queue and
I using win xp sp2.
This was my first idea.
I manage to operate the system. The problem was the direct format names
as Willy suggest.

Thank you for your help.

Moti
"Nicholas Paldino [.NET/C# MVP]" wrote:
Moti,

It could be that is an incorrect message. Do you have the rights to
change the access permissions on the queue? Also, what version of MSMQ are
you running (please don't say the one from option pack 4)?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MSMQ workgroup and C#" <MSMQ workgroup and C#@discussions.microsoft.com>
wrote in message news:B3**********************************@microsof t.com...
My MSMQ is in workgroup installation.

I tried to add an event handler for the ReceiveCompleted event and to do
It I try to use the SetPermissions. but I get an error of

"A workgroup installation computer dose not support the operation"

The code is:

MessageQueue myQueue = new MessageQueue(".\\myQueue");
System.Messaging.Trustee trustee = new Trustee(@".\\myQueue");
MessageQueueAccessControlEntry ace = new
MessageQueueAccessControlEntry(trustee,System.Mess aging.MessageQueueAccessRights.FullControl);

myQueue.SetPermissions(ace); // Error here!!!

myQueue.Formatter = new XmlMessageFormatter(new type[]{typeof(String)});

// Add an event handler for the ReceiveCompleted event.
myQueue.ReceiveCompleted += new
ReceiveCompletedEventHandler(MyReceiveCompleted); // Error here too!!!

// Begin the asynchronous receive operation.
myQueue.BeginReceive();

Does anyone know how to pass this problem?

Moti Saba


Nov 16 '05 #5

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...
5
by: Girish G | last post by:
I am trying to invoke a queued component and to my surprise the call succeeds locally but fails when the component resides on a separate box. Both the machines (client and server) in use have...
3
by: Moti | last post by:
Hi all I need your help in MSMQ and C# I tried to add an event handler for the ReceiveCompleted event But then I get an error: “A workgroup installation computer dose not support the...
0
by: Mike Z | last post by:
I have an ASP.Net app that needs to call an assembly that sends messages to a remote public MSMQ queue on a Windows Server 2003 machine. I can send messages to it successfully from several other...
5
by: Alex Nitulescu | last post by:
Hi. I'm trying to make MSMQ work, so I go to Control Panel, Windows Components, I select MSMQ (Message Queuing Client Setup, actually) and about half-way through I get a nice message box saying ...
14
by: Webbee | last post by:
I have a service built that is trying to read messages from a private que. When this tries to happen I get this error.... A workgroup installation computer does not support the operation From...
5
by: DBC User | last post by:
Hello, Is there an alternative approach to MSMQ for delivering messages? I am planning to develop an app which I don't want clients to install MSMQ (or do anything otherthan install my app). I...
3
by: yonirabin | last post by:
Hello, I am building a system in C# 2.0 using the master - worker design pattern The system is supposed to work as follows: 1. The Master sends Command objects to several workers 2. All Commands...
1
by: Florence Tissot | last post by:
We are seeing some kind of resource leak in our performance lab running an ASP.NET (2.0) application that sends and receives messages from 2 public MSMQ queues. Here's a brief summary of what are...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.