简体   繁体   English

NetMsmqBinding WAS服务无法从工作组中的远程MSMQ队列读取消息

[英]NetMsmqBinding WAS service fails to read messages from remote MSMQ queue in a workgroup

We have a service that is hosted in IIS using WAS with the net.msmq binding. 我们有一个使用net.msmq绑定的WAS托管在IIS中的服务。 The service reads messages from a private transactional MSMQ queue. 该服务从私有事务MSMQ队列中读取消息。 I need it to work by reading from a queue that is on a different machine to the service. 我需要它通过从与服务不同的机器上的队列读取来工作。 I can get it working if the queue is on the same machine, but not if it is on a different machine. 如果队列在同一台计算机上,则可以正常工作,但如果队列在另一台计算机上,则无法运行。

Environment information 环境信息

  • The servers are running Windows Web Server 2008 R2. 服务器正在运行Windows Web Server 2008 R2。
  • The servers are in a workgroup, ie, they are not part of a domain. 服务器在工作组中,即它们不属于域。
  • MSMQ has been installed without the directory service integration feature. 没有安装目录服务集成功能的MSMQ。
  • I believe that the required Windows features are installed (WCF Non-Http Activation and Http Activation, Message Queuing Server, Multicasting Support, Message Queueing DCOM Proxy, Windows Process Activation Service, .NET Environment, Configuration APIs) 我认为已安装了必需的Windows功能(WCF非HTTP激活和Http激活,消息队列服务器,多播支持,消息队列DCOM代理,Windows进程激活服务,.NET环境,配置API)
  • I have made the following registry changes on the machines: 我在计算机上进行了以下注册表更改:
    • NewRemoteReadServerAllowNoneSecurityClient = 1 NewRemoteReadServerAllowNoneSecurityClient = 1
    • NewRemoteReadServerDenyWorkgroupClient = 0 NewRemoteReadServerDenyWorkgroupClient = 0
    • AllowNonauthenticatedRpc = 1 AllowNonauthenticatedRpc = 1
  • DTC has been enabled, with Network DTC Access, Allow Remote Clients, Allow Inbound, Allow Outbound, No Authentication Required and Enable SNA LU 6.2 Transactions all selected. 已启用DTC,并且已选择“网络DTC访问”,“允许远程客户端”,“允许入站”,“允许出站”,“不需要身份验证”和“启用SNA LU 6.2事务”。
  • Firewall changes have been made. 防火墙已进行更改。

Service configuration information 服务配置信息

  • We are using netMsmqBinding. 我们正在使用netMsmqBinding。
  • The transport Security Mode of the netMsmqBinding is None. netMsmqBinding的传输安全模式为“无”。
  • ExactlyOnce is true 完全正确
  • UseActiveDirectory is false UseActiveDirectory为假
  • Durable is true 持久是真的
  • The queue address is net.msmq://the-host-computer-name/private/EmailAsyncService 队列地址为net.msmq:// the-host-computer-name / private / EmailAsyncService

WCF logging WCF日志记录

  • There is a warning: 有一个警告:

Cannot detect if the queue is transactional". The FormatName of the queue in the error is DIRECT=OS:the-host-computer-name\\private$\\EmailAsyncService 无法检测队列是否是事务性的。”错误中队列的FormatName是DIRECT = OS:-主机计算机名称\\ private $ \\ EmailAsyncService

  • There is then an error: 然后有一个错误:

An error occurred when converting the 'the-host-computer-name\\private$\\EmailAsyncService' > queue path name to the format name: Unrecognized error -1072824300 (0xc00e0014). 将“主机名称\\ private $ \\ EmailAsyncService”>队列路径名转换为格式名称时发生错误:无法识别的错误-1072824300(0xc00e0014)。 All operations on the queued channel failed. 排队的通道上的所有操作均失败。 Ensure that the queue address is valid. 确保队列地址有效。 MSMQ must be installed with Active Directory integration enabled and access to it is available. 必须在启用了Active Directory集成的情况下安装MSMQ,并且可以对其进行访问。

What I have tried 我尝试过的

  • I can read messages from the remote queue from the machine the service is on if I manually create and use a MessageQueue instance. 如果我手动创建和使用MessageQueue实例,则可以从服务打开的计算机上的远程队列中读取消息。
  • I've tried hosting the service as a standalone console application. 我曾尝试将服务托管为独立的控制台应用程序。 The error messages are the same. 错误消息是相同的。
  • I have tried disabling the firewalls involved. 我曾尝试禁用所涉及的防火墙。
  • I've tried the changes on http://msdn.microsoft.com/en-us/library/ms752246.aspx , which relate to running such services on a computer joined to a workgroup. 我已经尝试了http://msdn.microsoft.com/zh-cn/library/ms752246.aspx上的更改,这些更改与在加入工作组的计算机上运行此类服务有关。 ("both the activation service and the worker process must be run with a specific user account (must be same for both) and the queue must have ACLs for the specific user account... In workgroup, the service must also run using an unrestricted token.") The user account I'm currently using is Network Service. (“激活服务和辅助进程都必须使用特定的用户帐户运行(两者都必须相同),并且队列必须具有该特定用户帐户的ACL。在工作组中,该服务还必须使用不受限制的运行令牌。”)我当前使用的用户帐户是网络服务。

Some thoughts 一些想法

  • I don't believe that there is a firewall or permissions issue. 我认为没有防火墙或权限问题。
  • Despite the fact that the service configuration has UseActiveDirectory set to false, the queue address of net.msmq://the-host-computer-name/private/EmailAsyncService seems to be getting translated into the-host-computer-name\\private$\\EmailAsyncService, which AFAIK is a name format that requires lookup via Active Directory. 尽管服务配置的UseActiveDirectory设置为false,但net.msmq:// the-host-computer-name / private / EmailAsyncService的队列地址似乎已转换为host-computer-name \\ private $ \\ EmailAsyncService,该AFAIK是一种名称格式,需要通过Active Directory查找。

I'm a little late here, but since you have no other answers, I may still be of help. 我在这里有点晚了,但是由于您没有其他答案,因此我可能仍然会有所帮助。

You might want to try enabling Directory Service Integration, as I believe you need to muck with certificates to operate in Workgroup Mode. 您可能要尝试启用目录服务集成,因为我认为您需要考虑使用证书才能在工作组模式下运行。

Also, Juval Lowy's WCF book makes it clear that when you have queued services hosted in WAS you have to name the queue the exact same as the virtual path to your svc file. 同样,Juval Lowy的WCF书籍清楚地表明,当您对WAS中托管的服务进行排队时,必须将队列命名为与svc文件的虚拟路径完全相同的名称。 So if your service is actually hosted at /EmailAsyncService/EmailService.svc then that's precisely what you need to name your queue (without the first slash). 因此,如果您的服务实际上托管在/EmailAsyncService/EmailService.svc上,那么这正是您需要为队列命名的名称(不带第一个斜杠)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM