9
我有一個WCF服務託管在Windows服務中,我將其設置爲自動,以便在服務器啓動時自動啓動。服務端點是MSMQ支持的。MSMQ支持的Windows服務中託管的WCF服務在啓動時失敗
當我手動啓動服務時,一切都很好。但是,當服務在啓動時啓動,我得到一個MSMQ例外:
System.TypeInitializationException: The type initializer for
'System.ServiceModel.Channels.Msmq' threw an exception. --->
System.ServiceModel.MsmqException: The version check failed with the error:
'The Message Queuing service is not available (-1072824309, 0xc00e000b)'. The
version of MSMQ cannot be detected All operations that are on the queued channel
will fail. Ensure that MSMQ is installed and is available.
at System.ServiceModel.Channels.MsmqQueue.GetMsmqInformation
(Version& version, Boolean& activeDirectoryEnabled)
at System.ServiceModel.Channels.Msmq..cctor()
--- End of inner exception stack trace ---
這似乎是MSMQ不準備在服務啓動之前使用...有一個解決的辦法?
謝謝!谷歌的異常消息證明是徒勞的! – puffpio