Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem sending to private queue on another machine with msmq

652 views
Skip to first unread message

Richard

unread,
Apr 7, 2005, 10:55:02 AM4/7/05
to
I have msmq installed on both machines as a workgroup

i am attempting to read the private queue MyQueue On DTW-TEMP-WEBSVR
from my machine

using the code

oQueue.Path = "FormatName:DIRECT=OS:DTW-TEMP-WEBSVR\Private$\MyQueue"


oQueue.Send("lll", "My Customer Dataset")

i get the error

The specified format name does not support the requested operation. For
example, a direct queue format name cannot be deleted.

when i use the path
oQueue.Path = ".\Private$\MyQueue"

it works ok

How do i send to a private queue on another machine?

Yoel Arnon

unread,
Apr 8, 2005, 4:35:29 AM4/8/05
to
Hi Richard,
The lines of code you posted look perfectly OK...

Can you post the full working code and the error you got?

BTW: This is the code that worked for me... (In C#)
MessageQueue oQueue = new MessageQueue();

oQueue.Path = @"FormatName:DIRECT=OS:DTW-TEMP-WEBSVR\Private$\MyQueue";

oQueue.Send("lll", "My Customer Dataset");

Thanks a lot,
Yoel
www.msmq.biz

"Richard" <Ric...@discussions.microsoft.com> wrote in message
news:F011B38A-44C3-459A...@microsoft.com...

Frank Boyne

unread,
Apr 8, 2005, 11:30:30 AM4/8/05
to
"Richard" <Ric...@discussions.microsoft.com> wrote in message
news:F011B38A-44C3-459A...@microsoft.com...
> i am attempting to read the private queue MyQueue

I think you mean 'write' not 'read' (since your sammple code does a send not
a receive).

> The specified format name does not support the requested operation. For
> example, a direct queue format name cannot be deleted.

Are you trying to do a send within a transaction?


Richard

unread,
Apr 8, 2005, 4:17:08 PM4/8/05
to
ooops! Yes i mean write not read. I am attempting to send to the queue and
i am not using a transaction

Richard

unread,
Apr 11, 2005, 8:58:01 AM4/11/05
to
Dim Queue As New
MessageQueue("FormatName:DIRECT=OS:DTW-TEMP-WEBSVR\Private$\MyQueue")
Queue.Send("Test")

this code gets the same result

Frank Boyne

unread,
Apr 11, 2005, 2:50:25 PM4/11/05
to
"Richard" <Ric...@discussions.microsoft.com> wrote in message
news:B8F9A89C-6154-445A...@microsoft.com...

> Dim Queue As New
> MessageQueue("FormatName:DIRECT=OS:DTW-TEMP-WEBSVR\Private$\MyQueue")
> Queue.Send("Test")

I just use cut and paste to place those two lines of code into a VB.NET
program's button click handler and it worked as expected - the message was
sent to the appropriate outgoing queue.

Of course my system doesn't recognise the name DTW-TEMP-WEBSVR so the
message can never get delivered, but that's not important, the send
succeeded.

> this code gets the same result

Could you enclose the Send call in a try-catch block, write
exception.ToString () to the console and then post the whole exception
description here?


diego.ta...@gmail.com

unread,
Aug 14, 2016, 11:16:38 PM8/14/16
to
im sorry but. could y help me pls?

I have this code (C#):

System.Messaging.Message msg = new System.Messaging.Message();
msg.Body = "hello"

MessageQueue mq = new MessageQueue("FormatName:DIRECT=OS:mymachinename\\PRIVATE$\\temp");

mq.SetPermissions("Everyone", MessageQueueAccessRights.FullControl);

mq.Send(msg, "hello");

but always got this error:
"The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted."

where i can find any example of MessageQueue to send a remote machine with private queue
0 new messages