0

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>

The client(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>

Thanks in advance :)

2 Answers2

0

This may be because IIS is not starting your application after recycled.

Possible solution is to configure auto-start. Then IIS will start your service immediately without waiting for the first request.

Nick
  • 798
  • 1
  • 7
  • 14
0

The possible solution of Imortist works!!

But first you need to add AppFabric to your ISS, then you need be sure you have the "Start Mode" option in your pool advance settings.

Note: In my windows 7 IIS7 didnt work, but in my windows server 2012 R2 IIS8 Works perfectly