IIS中托管的MSMQ WCF [英] MSMQ WCF hosted in IIS
问题描述
在以下情况下,我陷入困境-我有两个Web应用程序- A 和 B .它们都在同一台计算机上运行. B 正在托管 netMsmqBinding WCF服务.另外, B 的应用程序池刚刚回收了自身. A 呼叫 B 的WCF服务.我看到消息已经到达我创建的专用MSMQ队列中.但是,直到我不浏览* .svc URL为止,该消息才不会通过 B 进行处理. 我是否缺少此技术所需的内容?实现这种功能的干净方法是什么? 这些是我正在使用的配置.如果我错过了一些有用的信息,请告诉我,我将提供它: 服务(B):
I am stuck in the following case - I have two web applications – A and B. They are both running on the same computer. B is hosting a netMsmqBinding WCF Service. Also, B’s application pool has just recycled itself. A calls B’s WCF service. I see that the message has arrived in the private MSMQ queue which I have created. But until I don’t browse the *.svc URL the message is not proceed by B. Am I missing something required by this technology? What is the clean way to implement such a functionality? These are the configuration that I am using. If I missed some helpful info, please, tell me and I will provide it: The service (B):
<system.serviceModel>
<services>
<service name="MyProject.Web.Services.EmsListener">
<endpoint address="net.msmq://localhost/private/myQueue"
binding="netMsmqBinding" bindingConfiguration="MyMsmqBinding"
contract="MyProject.Abstraction.IEmsListener">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<netMsmqBinding >
<binding name="MyMsmqBinding"
durable="true"
receiveRetryCount="2"
maxRetryCycles="2"
retryCycleDelay="00:01:00"
receiveErrorHandling="Move" >
<security mode="None">
<message clientCredentialType="None"/>
<transport msmqAuthenticationMode="None" msmqProtectionLevel="None" />
</security>
</binding>
</netMsmqBinding>
客户(A):
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="MyBinding ">
<security mode="None" />
</binding>
</netMsmqBinding>
</bindings>
<client>
<endpoint address="net.msmq://localhost/private/myQueue" binding="netMsmqBinding"
bindingConfiguration=" MyBinding " contract="EmsListener.IEmsListener"
name=" MyBinding " />
</client>
</system.serviceModel>
先谢谢您了:)
推荐答案
这可能是因为IIS在回收后没有启动您的应用程序.
This may be because IIS is not starting your application after recycled.
可能的解决方案是配置自动启动.然后IIS将立即启动您的服务,而无需等待第一个请求.
Possible solution is to configure auto-start. Then IIS will start your service immediately without waiting for the first request.
这篇关于IIS中托管的MSMQ WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!