I have seen several posts related to this but I have not found an answer to my problem
So I have a client sending messages to a MSMQ using WCF netmsmq binding. This works fine.
I have a web site hosted in my local IIS7 (Windows 7) exposing a WCF MSMQ endpoint.
When I publish a message from the client, the messages are not being consumed, they just stay in queue forever UNTIL , I manually browse the service, after that the messages are sent to the service hosted in IIS
So what do I need to do in order to consume the messages automatically by my WCF service hosted in IIS?
Note: I just noticed that after calling any WCF service hosted in my web applicaiton in IIS wakes up the service or something and suddenly the queue messages are consumed...
<system.serviceModel>
<client>
<endpoint name="Service.ServiceContracts.QueueLoggingService NET MSMQ"
address="net.msmq://localhost/private/Service.WebHost/QueueLoggingService.svc"
binding="netMsmqBinding"
contract="Service.ServiceContracts.IQueueLoggingService">
</endpoint>
</client>
<bindings>
<netMsmqBinding>
<binding exactlyOnce="true" durable="true" maxRetryCycles="15" receiveRetryCount="15">
<security mode="None">
<message clientCredentialType="None" />
<transport msmqAuthenticationMode="None" />
</security>
</binding>
</netMsmqBinding>
</bindings>
</system.serviceModel>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
</serviceHostingEnvironment>
<services>
<service name="Service.ServiceImplementations.QueueLoggingService">
<endpoint
address="net.msmq://localhost/private/Service.WebHost/QueueLoggingService.svc"
binding="netMsmqBinding"
contract="Service.ServiceContracts.IQueueLoggingService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<netMsmqBinding>
<binding exactlyOnce="true" durable="true" maxRetryCycles="15" receiveRetryCount="15">
<security mode="None">
<message clientCredentialType="None" />
<transport msmqAuthenticationMode="None" />
</security>
</binding>
</netMsmqBinding>
</bindings>
</system.serviceModel>
Things that I have tried:
My Default Web Site contains the following configuration:
<application path="/Service.WebHost" applicationPool="MyGenericAppPool" enabledProtocols="net.msmq, http"> <virtualDirectory path="/" physicalPath="C:\\Some Path\\Service.WebHost" /> </application> <bindings> <binding protocol="http" bindingInformation="*:80:" /> <binding protocol="net.tcp" bindingInformation="808:*" /> <binding protocol="net.pipe" bindingInformation="*" /> <binding protocol="net.msmq" bindingInformation="localhost" /> <binding protocol="msmq.formatname" bindingInformation="localhost" /> </bindings>
The autostart functionality is provided by AppFabric, so you must install it. Then, you will be able to use a command line similar to this one, in order to auto-start your WAS application :
appcmd.exe set app /app.name:YourApplication /serviceAutoStartEnabled:True /serviceAutoStartMode:All
OK
This guy saved me hours of reserching:
Paul Bahler @paulbahler
Turns out that even when the AppPool was set to Start Automatically .... it was not apperantly...
So this guy suggested me to install App Fabric tools and then just configure the application to automatically start and booooooom it worked
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.