简体   繁体   English

WCF MSMQ DllNotFoundException

[英]WCF MSMQ DllNotFoundException

I am trying to access a remote WCF service (using netMsmqBinding) hosted in a windows service and am getting the error: 我正在尝试访问Windows服务中托管的远程WCF服务(使用netMsmqBinding),并收到错误消息:

Message: System.TypeInitializationException: The type initializer for 'System.ServiceModel.Channels.Msmq' threw an exception. ---> System.DllNotFoundException:     Unable to load DLL 'mqrt.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at System.ServiceModel.Channels.UnsafeNativeMethods.MQGetPrivateComputerInformation(String computerName, IntPtr properties)

I have read that this error may come up if msmq is not installed, but msmq is not supposed to be installed on the local machine... it is installed on the remote machine it is trying to talk to. 我已经读到,如果未安装msmq,则可能会出现此错误,但不应在本地计算机上安装msmq ...它已安装在尝试与之通信的远程计算机上。

What else can cause this? 还有什么会导致这种情况?

Any machine wishing to participate in the transmission of messages requires MSMQ to be installed. 任何希望参与消息传输的机器都需要安装MSMQ。

This is because MSMQ uses a messaging pattern called Store and forward , which is what makes MSMQ robust to transmission failures. 这是因为MSMQ使用称为Store and forward的消息传递模式,这使MSMQ对传输失败具有鲁棒性。

Go to Programs and Features and then Turn Windows Feature on or off . 转到“ 程序和功能” ,然后打开或关闭Windows功能 Find Microsoft Message Queue (MSMQ) Server and enable it. 查找Microsoft Message Queue(MSMQ)服务器并启用它。

credit to: https://stackoverflow.com/a/26705197/782856 归功于: https : //stackoverflow.com/a/26705197/782856

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

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