Reputation: 237
I have a little .NET console app running on a Windows CE 5 device which gathers RFID tag information. As each tag is read it writes the relevant data to a remote message queue sitting on a Windows 7 machine. The queue is private so I access it explicitly which is I understand the way to do it. It is transactional although I don't believe that is relevant in the context of the problem, as I believe the default on SendMsg is Automatic. I could be wrong of course.
using (var myQueue = new MessageQueue("FormatName:Direct=OS:w7machinename\private$\tags")) { try { myQueue.Send(newTag); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
If I run the program no exception is raised. To all intents and purposes it appears to have written the data to the queue. If however I look at the queue using QueueExplorer there are no messages in the queue. If after running it I go to my Win CE 5 device Dos prompt and do msmqadm enum queues I see that it knows about the queue, it states it is private, remote and inactive with 0 msg's and 0 bytes.
I've seen in other posts that changing the permissions on the queue doesn't make any difference, but some clarification on that would be good. Also someone mentioned firewall and ports but I got a little confused by the answer around that.
I hope this is enough information for someone to see my problem / error of my ways and thank anyone in advance for any help or pointers.
Apologies for the formatting on the source code. Regards Kindo Malay
Upvotes: 0
Views: 838
Reputation: 237
Ok after much playing around I've realised some stuff.
OK On a general level the messages on the remote queue won't appear, nor will they single to the send of the message on the origin machine that there is an error unless the queue has rights for the anonymous users to Send Message AND Take Ownership. I'm not sure if beyond Send message what other options would allow the message to appear. Also I'm thinking I'll need to do more research and / or take advice as to how the permissioning will work in a production environment.
Also due I assume to MSDTC not running the queue cannot be transactional.
What I also see in the Windows CE device is that although msmqadm enum queues actually lists the remote queue it can't determine whether any messages are in it.
So there we are...I hope this helps someone else.
Upvotes: 1