2013-03-13 67 views
2

「當應用程序池處於」活動「狀態時,服務會正確拾取消息,但只要應用程序池得到回收(因爲超時或任何其他原因)時,服務停止拾取消息,該消息僅在隊列中坐在 直到通過瀏覽到服務網頁再次啓動服務「Net.Msmq綁定一旦應用程序池得到回收,就不會收集隊列中的消息

您是否找到解決方案來激活服務而不用手動瀏覽服務。

+0

你試過嗎?嘗試http://keithelder.net/blog/archive/2009/06/03/fix-for-wcf-netmsmqbinding-not-picking-up-messages-in-queue.aspx http://www.codewrecks.com/ blog/index.php/2009/03/17/hosting-a-wcf-service-based-on-msmq-in-iis7/http://social.msdn.microsoft.com/Forums/en-US/wcf/ thread/a1df55c4-e642-442a-9057-f0aec278d10c /和其他的) – Kiquenet 2015-02-03 14:55:41

回答

1

看一看下面的鏈接: http://blogs.msdn.com/b/distributedservices/archive/2011/11/11/wcf-and-msmq-integration.aspx#comments

我有同樣的問題的時刻。它應該在.net 4.5中修復,但我使用4.5,但我仍然遇到這個問題。

+0

微軟沒有給出解決方案:https://social.msdn.microsoft.com/Forums/vstudio/en-US/17d3638e-92bf-49c1-9b08 -5050a58d09c4/netmsmq-binding-not-pick-up-messages-in-queue-as-the-the-the-application-pool-gets-recycled?forum = wcf – Kiquenet 2015-02-03 14:56:36

+0

你是否在這裏嘗試瞭解決方法http:// blogs。 msdn.com/b/distributedservices/archive/2011/11/11/wcf-and-msmq-integration.aspx#comments? – Kiquenet 2015-02-03 14:58:20

1

解決的辦法是配置auto-start。然後,IIS將立即啓動您的服務,無需等待第一個請求。

但首先您需要將AppFabric添加到您的ISS,那麼您需要確保您的池預設設置中具有「啓動模式」選項。

注:在我的Windows 7 IIS7沒有工作,但在我的Windows Server 2012 R2 IIS8完美的作品

你也可以檢查此類似的問題: MSMQ WCF hosted in IIS