MSMQ 读取错误(访问被拒绝)
我在本地计算机上的其他进程中创建了一个队列,如下所示:
MessageQueue.Create(@".\private$\sampleQueue");
在我的读取器进程中,我按如下方式附加到它:
var queue = new MessageQueue(@".\private$\sampleQueue");
当我尝试执行 queue.Peek()
时,我获得了访问权限拒绝例外。我不在域中,这只是我的本地工作组计算机。有什么想法吗?
I create a queue on my local machine in some other process as follows:
MessageQueue.Create(@".\private$\sampleQueue");
And in my reader process, I attach to it as follows:
var queue = new MessageQueue(@".\private$\sampleQueue");
When I try to do queue.Peek()
, I get an access denied exception. I'm not on a domain, this is just my local workgroup computer. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
MSMQ 使用不同的协议来工作:
如果这不是一个简单的权限问题(很可能是),那么您需要这篇博文:
了解 MSMQ 安全性如何阻止 RPC 流量
http://blogs.msdn.com/b/johnbreakwell/archive/2010/03/24/understanding-how-msmq-security-blocks-rpc-traffic.aspx
干杯
约翰
MSMQ uses different protocols for it's work:
If it is not a simple permissions issue (which it is very likely to be) then you need this blog post:
Understanding how MSMQ security blocks RPC traffic
http://blogs.msdn.com/b/johnbreakwell/archive/2010/03/24/understanding-how-msmq-security-blocks-rpc-traffic.aspx
Cheers
John
如果您在“计算机管理”中右键单击队列并选择“属性”,您是否在“安全”选项卡上设置了适当的权限?
If you r-click on the queue in Computer Management and select properties, do you have the appropriate permissions set on the Security tab?
创建队列的进程使用的凭据必须与读取队列的进程使用的凭据不同。如果情况必须如此,那么您需要在创建队列后专门授予该队列所需的读取权限。
The credentials used by the process that creates the queue must be different from the credentials of the process used to read the queue. If that is the way it must be, then you will need to specifically grant the needed read permissions on the queue after you create it.