应用程序池回收后,Net.Msmq绑定不会在队列中接收消息 [英] Net.Msmq Binding Not Picking Up Messages in Queue as soon as the application pool gets recycled

查看:70
本文介绍了应用程序池回收后,Net.Msmq绑定不会在队列中接收消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们正在尝试实现公开net.msmq终结点的wcf服务.我们正在以DOMAIN模式运行Windows Server 2008 R2/IIS 7.5.

We are trying to implement a wcf service that exposes a net.msmq endpoint.  We are running windows server 2008 R2/IIS 7.5 running on a DOMAIN mode.

1.我们的服务称为service.svc,它部署在默认网站(在网络服务下运行的应用程序池)中名为Test的应用程序下.

1. Our service is called service.svc and it is deployed under an application called Test in the default website (application pool running under network service)

2.到达服务网页的网址是 http://machinename/Test/service.svc .

2. The url to reach the service webpage is http://machinename/Test/service.svc.

3.我们创建了一个名为Test/service.svc的专用队列,并将网络服务的权限配置为完全控制.

3. We created a private queue called Test/service.svc and we configured permissions for network service to full control.

现在,当应用程序池处于活动"状态时,该服务正确地提取了消息,但是一旦应用程序池被回收(由于超时或任何其他原因),该服务就会停止提取仅位于队列中的消息,直到该服务重新启动为止浏览到服务网页( http://machinename/Test/service.svc )

Now, when the application pool is "alive" the service picks up the messages correctly, but as soon as the application pool gets recycled (because of timeout or any other reason), the service stops picking up the messages, that just sit in the queue until the service starts again by browsing to the service webpage (http://machinename/Test/service.svc)

我知道这是一个很普遍的问题,但我已经尝试了几种解决方案,但都没有运气(例如,我们尝试了 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/  和其他)

I know this is a popular question, but I already tried several solutions with no luck (for example, we triedhttp://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/ and other ones)

有帮助吗?

推荐答案

亚历山德罗

只有启动服务后,服务才能处理队列.当您回收appPool时,该服务将停止,直到提出请求后该服务才会启动.这就是为什么当您查询服务元数据页面时会拾取消息的原因.

The queues can only be processed by the service if the service is started. When you recycle the appPool, the service stops and will not start until a request is made. This is why it picks up the messages when you query the service metadata page.

干杯

弗朗索瓦州


这篇关于应用程序池回收后,Net.Msmq绑定不会在队列中接收消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆