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