WCF Activation for MSMQ where the service (.svc) is on the root -


vs 2012/.net4.5, windows 8/iis8 , 64 bit

using wcf service application, documentation i've seen far in naming msmq queue match service name assume fact using application or virtual directory underneath iis website.

this quoted msdn http://msdn.microsoft.com/en-us/library/ms789042.aspx

the application being activated must match (longest match) prefix of queue name.

for example, queue name is: msmqwebhost/orderprocessing/service.svc. if application 1 has virtual directory /msmqwebhost/orderprocessing service.svc under it, , application 2 has virtual directory /msmqwebhost orderprocessing.svc under it, application 1 activated. if application 1 deleted, application 2 activated.

also, http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx

however when hosting msmq-enabled service in iis 7 was, queue name must match uri of service's .svc file. in example we'll hosting service in application called msmqservice .svc file called msmqservice.svc, queue must called msmqservice/msmqservice.svc. queues used wcf services should private

and, http://msdn.microsoft.com/en-us/magazine/cc163357.aspx

it's important note activation of msmq endpoints works correctly if queue has same name .svc file (minus machine name). means if service endpoint /server/app/service.svc, queue name must app/service.svc.

myservice.svc file directly under root of iis website (which using .net 4 pool in integrated mode), did following:

  1. creating private transactional queue called myservice.svc , giving network services full control (for testing).
  2. setting web.config endpoint: address="net.msmq://localhost/private/myservice.svc"
  3. i able push message queue using client test application using address in (2).
  4. i added msmq protocol support website executing following: c:\windows\system32\inetsrv>appcmd set site "mywebsite" /+bindings.[protocol='net.msmq',bindinginformation='localhost'] (and checked added support properly)
  5. from website advanced settings have http,net.tcp,net.msmq in enabled protocols
  6. i double checked "net.msmq listener adapter", responsible activating service when message arrives, running , restarted it.
  7. my web.config:
<configuration>   <appsettings>     <add key="aspnet:usetaskfriendlysynchronizationcontext" value="true" />   </appsettings>   <system.web>     <compilation debug="true" targetframework="4.5" />     <httpruntime targetframework="4.5" />   </system.web>   <system.servicemodel>     <behaviors>       <servicebehaviors>         <behavior>           <servicemetadata httpgetenabled="true" httpsgetenabled="true" />           <servicedebug includeexceptiondetailinfaults="true" />         </behavior>       </servicebehaviors>     </behaviors>     <protocolmapping>       <add binding="basichttpbinding" scheme="http" />       <add binding="netmsmqbinding" scheme="net.msmq" />     </protocolmapping>     <servicehostingenvironment aspnetcompatibilityenabled="false"         multiplesitebindingsenabled="true" />     <bindings>       <netmsmqbinding>         <binding name="msmqbinding_imyservice" exactlyonce="true"             receiveerrorhandling="move">           <security mode="none"/>         </binding>       </netmsmqbinding>     </bindings>     <services>       <service name="companyname.service.myservice">         <endpoint name="myservice"           address="net.msmq://localhost/private/myservice.svc"           bindingconfiguration="msmqbinding_imyservice"           binding="netmsmqbinding" contract="imyservice" >         </endpoint>       </service>     </services>   </system.servicemodel>   <system.webserver>     <modules runallmanagedmodulesforallrequests="true" />     <directorybrowse enabled="false" />   </system.webserver> </configuration> 

my service not getting activated arrival of new messages queue , messages stay in queue. because not using application or virtual directory or there missing?

the problem sorted creating application within default website , modifying configuration fit new path.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -