I have a public message queue with full permissions to everyone, that I attempt to access from an anonymous web service.
Method
MessageQueue.Exists
-> Returns false all the time. If the queue is public and everyone has permissions, why can't I find it?I changed my code to look like this:
MessageQueue queue = new MessageQueue(name);
return queue.Peek(expireInterval);
But this throws exception that the queue does not exist or I have no permissions to access it.
The web service must remain anonymous, why is开发者_如何学Cn't it enough to give permissions on the queue?
I even tried giving full control to ANONYMOUS account, nada.
Someone please explain this voodoo to me, thanks in advance :)
After doing some research, I found a similar question asked in this site that was answered with changing the queue path from ".\QueueName" to "FormatName:DIRECT=OS:.\QueueName".
This indeed helped, although I couldn't find why. I then found this article: http://www.infosysblogs.com/microsoft/2007/02/msmq_sending_message_to_remote.html which explains that accessing a MSMQ remotely requires using FormatName syntax.
I still don't understand why this works when the WS is running under integrated security.
精彩评论