Question

I'm trying to setup a very simple WCF service using MSMQ. I am following the steps here. When I go to run my service and load the .svc file, I get the following error:

The protocol 'net.msmq' is not supported.

Here's the relevant part of my config:

<services>
  <service name="MSMQService.MSMQService">
    <host>
      <baseAddresses>
        <add baseAddress="http://technoka1-l7:9999/"/>
      </baseAddresses>
    </host>
    <endpoint address="net.msmq://technoka1-l7/private/MSMQService.svc"
              binding="netMsmqBinding" contract="MSMQService.IMSMQService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>

Any ideas on how to fix would be greatly appreciated. I've looked at a lot of different places that make suggestions for IIS, but this is running within Cassini right now.

Was it helpful?

Solution 3

Looks like Cassini only supports http, so there is no way to run straight from Visual Studio.

OTHER TIPS

That looks like an error you'd get from IIS. If you are hosting your service in IIS, look at this brief blog post on setting up IIS to handle the netMsmqBinding. For hosting in a Windows service, this old Byte form post has enough to get you going.

I recommend that you shift to IIS, the protocol has to be enabled in IIS itself, the fact that you are using a console, service, etc doesn't really matter. The host to your service is IIS, it's activator because of the protocol you are using and how you are using it.

Reference: http://geekswithblogs.net/LessonsLearned/archive/2010/12/27/the-protocol-net.msmq-is-not-supported.aspx

1) If you host your service manually(using console or another windows application), everything works fine.
2) If you try to start wcf service application, msmq binding is not supported. I haven't found solution for this problem yet.
3) If you host your wcf service using IIS, ensure both the SITE and APPLICATION support msmq protocol:

  1. Site->Bindings. Add msmq binding if it is necessary.
  2. Site->Extensive settings->Active protocols. Add "net.msmq" if it is necessary.
  3. Application->Extensive settings->Active protocols. Add "net.msmq" if it is necessary.

I was also looking for a way to debug WCF net.msmq services in IIS running straight from Visual Studio. I came across this great post which allows me to do it.

http://codenamesean.wordpress.com/2012/09/26/debugging-a-net-msmq-wcf-service-hosted-in-iis-7/

  • Start w3wp.exe process by selecting the “Browse *:80 (http)” link of your virtual directory in IIS
  • Debug Menu => Attach to w3wp.exe process
  • Run Client
  • Activate the Windows Process Activation Service by clicking on the virtual directory and browsing to your Service.svc. (Note: I didn't have to do this step for it to debug.)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top