从匿名 Web 服务访问 messageQueue
我有一个对每个人都有完全权限的公共消息队列,我尝试从匿名 Web 服务访问该队列。
方法
MessageQueue.Exists
->始终返回 false。如果队列是公共的,每个人都有权限,为什么我找不到它?我将代码更改为如下所示:
MessageQueue 队列 = new MessageQueue(name);
return queue.Peek(expireInterval);
但这会引发异常,即队列不存在或者我无权访问它。
Web 服务必须保持匿名,为什么仅仅授予队列权限还不够?
我什至尝试完全控制匿名帐户,但没有。
有人请向我解释一下这个巫术,提前谢谢:)
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 isn'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 :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一些研究,我发现此站点中提出了类似的问题,通过将队列路径从“.\QueueName”更改为“FormatName:DIRECT=OS:.\QueueName”来回答。
这确实有帮助,尽管我找不到原因。
然后我找到了这篇文章:
http://www.infosysblogs.com/microsoft/2007/02/msmq_sending_message_to_remote。 html
这说明远程访问 MSMQ 需要使用 FormatName 语法。
我仍然不明白为什么当 WS 在集成安全性下运行时这会起作用。
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.