I've got a very simple console app that is having trouble peeking at a message in a remote private queue.
var queues = MessageQueue.GetPrivateQueuesByMachine(machineName);
var queue = queues.Where(x=>x.FormatName == queueName).Single();
Message message = queue.Peek();
The Peek call fails with a MessageQueueException of "Access to Message Queuing system is denied".
Using the same client machine and user I am able to view the queue using Queue Explorer and with the Message Queuing Snap In.
Experimenting with a local queue I am only able to reproduce the error by taking away the Peek permission on the queue but that also stops it in the other tools.
I've seen lots of information that points me to the issues outlined here.
However, it seems like if any of those things was the issue, I wouldn't be able to do it using the other tools as well.
EDIT I have been able to get this to work using the MSMQQueueInfo/MSMQQueue COM objects without changing any credentials. It would be nice if I could make it work using the .NET libraries but at least I have a workaround.