У меня есть служба WCF, размещенная в службе Windows, для которой я установил Автоматически, поэтому она будет запускаться автоматически при запуске сервера. Служба является конечной точкой с поддержкой MSMQ.
Когда я запускаю службу вручную, все хорошо. Но когда служба запускается при загрузке, я получаю исключение 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 не готов к использованию до запуска службы ... есть ли решение для этого?