Tuesday, April 21, 2009

Unable to create Public/Private queues on remote machine

1) Following is used to create a public queue programmatically
System.Messaging.MessageQueue.Create(@"myMachine\MyQueue");
You can use an overload of the Create method to indicate that you want to create a transactional queue. You can also use a period ( . ) in the path to indicate the local machine.

However, when I tried to create the public queue on the remote machine I got the following exception:

An unhandled exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
Additional information: External component has thrown an exception.

I fixed this by assigning 'create queue' rights for the user (through which my application was creating the queue) on 'Messaging Queue' of the target machine.

2) Following is used to create a private queue programmatically System.Messaging.MessageQueue.Create(@"myMachine\Private$\MyQueue");

Private queues can just not be created on remote machine.

No comments:

Post a Comment