开发者

Accessing messageQueue from anonymous web service

开发者 https://www.devze.com 2023-01-14 12:26 出处:网络
I have a public message queue with full permissions to everyone, that I attempt to access from an anonymous web service.

I have a public message queue with full permissions to everyone, that I attempt to access from an anonymous web service.

  1. Method MessageQueue.Exists -> Returns false all the time. If the queue is public and everyone has permissions, why can't I find it?

  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消