Marat Faskhiev
Marat Faskhiev

Reputation: 1302

MSMQ exception occuring during queue creation

I'm trying to create message queue:

MessageQueue.Create(path, true);

And I'm getting the following exception:

The queue does not exist or you do not have sufficient permissions to perform the operation.

But queue was created in spite of exception. I tried several times:

  1. Remove queue
  2. Invoke create method
  3. Exception occurs
  4. Queue was created.

Could someone tell me the reason of exception? How can I avoid it?

Edited:

I tried on different machine. The same behavior.

OS: Windows 7. Console application. Runned by user with admin rights.

Upvotes: 0

Views: 527

Answers (1)

Marat Faskhiev
Marat Faskhiev

Reputation: 1302

I found how it can be avoided.

Path was equal to @"**localhost**\Private$\Queue".

I changed it to @"**.**\Private$\Queue" and the exception disappeared.

But the reason is still unclear.

Upvotes: 1

Related Questions