Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF, MSMQ - the protocol 'net.msmq' is not supported

Tags:

wcf

msmq

I am getting the error "the protocol 'net.msmq' is not supported" when I try and add a service reference to my WCF service in visual studio.

I have successfully ran appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] and I can see the configuration in the applicationHost.config file. Since I am running my service in visual studio, do I need to enable the net.msmq protocol for my specific application (appcmd set app "Default Web Site/MsmqService" /enabledProtocols:net.msmq)? Im not sure how to do this since my service is running in visual studio? If i dont need to do this, what else could be the issue. Here is my config. Any help appreciated..

<configuration>
   <system.serviceModel>
      <services>
          <service name="MessageRoutingService" 
                   behaviorConfiguration="ServiceBehavior">
             <host>
                <baseAddresses>
                    <add baseAddress="http://localhost:29376" />
                </baseAddresses>
             </host>
             <endpoint name="Response" 
                 address="net.msmq://localhost/private/Response" 
                 binding="netMsmqBinding" 
                 bindingConfiguration="TransactedBinding" 
                 contract="IResponse" />
             <endpoint 
                 address="mex"
                 binding="mexHttpBinding"
                 contract="IMetadataExchange" />
          </service>
      </services>
      <behaviors>
         <serviceBehaviors>
             <behavior name="ServiceBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
         </serviceBehaviors>
      </behaviors>
      <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
      <bindings>
         <netMsmqBinding>
            <binding name="TransactedBinding">
               <security mode="None">
               </security>
            </binding>
         </netMsmqBinding>
      </bindings>
   </system.serviceModel>
</configuration>
like image 827
user633609 Avatar asked Mar 14 '11 06:03

user633609


1 Answers

You need to enable the component "Microsoft Message Queue (MSMQ) Server" (1) and add "net.MSMQ" protocol in your application on IIS (2).

  1. Go to "Program and Features" in "Turn Windows features on or off" checked components under "Microsoft Message Queue (MSMQ) Server".

  2. Go to application on IIS, click "Advanced Settings" then "Enabled Protocols" add this ",net.MSMQ".

like image 85
Claudio Kazuo Hirakava Avatar answered Oct 10 '22 15:10

Claudio Kazuo Hirakava