2
votes

My machine is in Domain D1 and there are public MSMQs in a remote server in domain D2. I am connected through vpn to D2, i.e I can RDP the machine in D2 and access the MSMQ.

What I want is to access (Know the message count) of the MSMQ without RDPing the system. So I build an application for this. I used Impersonation to impersonate the user of D2(i.e used credentials of D2)but the problem is I am not able to access the "Public" MSMQ ( used Messagequeue.GetPublicQueue() ) and exceptions are thrown with message "A workgroup installation computer does not support the operation." but when I used MessageQueue.GetPrivateQueue() it returned a collection of private queue.

I tried using MSMQManager for messageCount Path = @"Direct:OS:machine\publicqueue"; FormatName=null; new MSMQManager.inIt(machineName, path , FormatName); This also throws an exception either the queue is not present or not open. but I can check that queue is working fine.

2

2 Answers

0
votes

Are you comfortable doing a tiny bit of programming? If not, are you comfortable using PowerShell?

Either way - I would check out this post as it seems to contain the answers you are looking for.

Good luck, hope this helps

0
votes
  • Your problem might be that you are working remotely.

The method GetPublicQueuesByMachine() is indeed not available over remote access.

You can see this in a feature matrix in the MSDN documentation: MessageQueue.GetPublicQueuesByMachine:

The following table shows whether this method is available in various Workgroup modes.

 Workgroup mode                         Available
 --------------                         ---------
 Local computer                         No
 Local computer and direct format name  No
 Remote computer                        No
 Remote computer and direct format name No
  • Also check the access privileges of your queues.

If I am wrong in the previous suggestion, it might be as simple as experimenting with the access rights for specific users in the network.

MSDN article Public and private queues states:

Default security access for public queues gives everyone permission to send messages to a public queue. Specific permissions must be granted for read access.