MSMQ问题再次读取远程专用队列 [英] MSMQ Issue reading remote private queues (again)

查看:69
本文介绍了MSMQ问题再次读取远程专用队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我的问题类似于如何接收来自私人工作组队列(基本上,我使用的是相同的代码).

Ok my issue is similar to How to receive message from a private workgroup queue (and I am basically using the same code).

我正在使用

MessageQueue.Create(@".\Private$\MyNewPrivateQueue");

使用以下方法在远程计算机上打开队列

Opening the queue on the remote machine with

var queue = new MessageQueue(@"FormatName:DIRECT=TCP:xxx.xxx.xxx.xxx\PRIVATE$\MyNewPrivateQueue");

使用queue.send()和queue.Receive()读写数据

And writing/reading data using queue.send() and queue.Receive()

我有两个正在尝试的系统.

I have two systems that I am experimenting with.

  1. Windows 7 Home Premium x64
  2. Windows XP SP3

当我在W7系统上创建专用队列并尝试写入然后从XP系统读取队列时(根据所引用的问题),它会失败,并在读取操作上出现消息队列服务不可用"异常.

When I create the private queue on the W7 system and try to write then read the queue from the XP system (as per the referenced question) it fails with a "Message Queue Service is not available" exception on the read action.

但是,当我反转系统时(在XP系统上创建队列,并使用相同的代码从W7系统写入/读取),它正常工作.

However, when I reverse the systems (create the queue on the XP system and write/read from the W7 system, and using the same code) it works as expected.

我已经通过:

  1. 从远程队列中读取消息
  2. 从Windows Server 2008远程获取MSMQ消息
  3. 清除道路-MSMQ通过
  1. Reading Messages from Remote Queues
  2. Understanding how MSMQ security blocks RPC traffic
  3. Getting MSMQ messages out of Windows Server 2008 remotely
  4. Clear the way - MSMQ coming through
  5. MSMQ 3.0 too secure for you?

我还尝试过关闭W7和XP防火墙,并给每个人和他的狗在队列上的全部权限无济于事.

I have also tried turning off the W7 and XP firewalls, and given every man and his dog full permissions on the queues themselves to no avail.

鉴于它可以与XP作为队列主机一起使用,而不能与W7作为主机一起使用,我认为这是一个安全问题,而不是代码问题.但是对于我的一生,我看不到W7中的障碍物在哪里.

Given that it works with XP as the queue host but not with W7 as the host I assume that it s a security issue and not a code issue. But for the life of me I cannot see where in W7 the blockage is.

编辑8/9

确定..添加

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\Security\AllowNonauthenticatedRPC 

允许我从远程专用队列中阅读消息.但是,这似乎不允许使用

Allowed me to read messages from the remote private queue. However this does not seem to allow the use of

GetPrivateQueueByMachine(String machineName)

枚举可用的专用队列.那么对此有什么想法吗?

to enumerate the available private queues. So any ideas for this one?

推荐答案

好..很显然,我没有阅读所有我需要阅读的内容.答案是:

OK .. I obviously didn't read all I needed to read. The answer was in:

MSMQ 4.0-计算机管理中有什么新功能?

我需要添加一个新的注册表项:

I needed to add a new registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\Security\AllowNonauthenticatedRPC

并将值设置为1.

一旦我在W7服务器上执行了此操作,就可以从XP计算机上读取队列.

Once I did this on the W7 server, then I could read the queue from the XP machine.

我是唯一一个认为任何人都可以写到队列中这很奇怪的人,但是我必须将其设置为从队列中读取吗?太奇怪了

Am I the only one who thinks this is weird that anyone could write to the queue, but I had to set this to read from the queue? That is so bizarre.

这篇关于MSMQ问题再次读取远程专用队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆