WCF, MSMQ - the protocol 'net.msmq' is not supported
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"
开发者_StackOverflow 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>
You need to enable the component "Microsoft Message Queue (MSMQ) Server" (1) and add "net.MSMQ" protocol in your application on IIS (2).
Go to "Program and Features" in "Turn Windows features on or off" checked components under "Microsoft Message Queue (MSMQ) Server".
Go to application on IIS, click "Advanced Settings" then "Enabled Protocols" add this ",net.MSMQ".
精彩评论