Name = machineName\QueueName - Public Queue
Name = machineName\Private$\QueueName - Public Queue
Unlike Public queue, Private queues can not be created on the remote machine.
I thought all was done and my application will start running fine with this change. However, one more hurdle was waiting its turn. The ServiceHost instantiation reported error
There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information.
The Inner exception read:
An error occurred while opening the queue:The queue does not exist or you do not have sufficient permissions to perform the operation. (-1072824317, 0xc00e0003). The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.
Prima-facie it looked like a permission/rights issue. I googled the error message and was suggested to try various options like creating the user with same id and password on both the machine and giving full control of the queue to the anonymous user. However, non of them worked.
Finally a trail worked. I just changed URI end point from
net.msmq://machineName/QueueName
to
net.msmq://machineName/private/QueueName