2013-03-13 70 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