2012-11-16 22 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