2012-11-16 37 views
1

我试图访问远程WCF服务(使用netMsmqBinding)在Windows服务中托管,并正在错误:WCF MSMQ DllNotFoundException

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) 

我已阅读,这个错误可能出现如果MSMQ是不已安装,但msmq不应该安装在本地计算机上......它安装在它正试图与之通话的远程计算机上。

还有什么可以导致这种情况?

回答

0

任何希望参与消息传输的机器都需要安装MSMQ。

这是因为MSMQ使用称为Store and forward的消息传递模式,这使得MSMQ对传输失败具有鲁棒性。

+0

比方说,我有一些Windows 2008的服务器和某些Windows 2003服务器,会不会有问题,那么,因为他们有不同的版本,MSMQ的? – user1830197

+0

禁止某些例外情况(请参阅:http://blogs.msdn.com/b/johnbreakwell/archive/2007/06/29/the-message-format-h​​as-changed-in-msmq-4-0-so-re -test-all-your-applications.aspx)所有版本应该相互兼容。 –

+0

嗨user1830197,我在这里有完全相同的问题:http://stackoverflow.com/q/18577115/192999。你能告诉我更多关于你如何解决问题的方法吗?任何帮助赞赏。 – ETFairfax