简体   繁体   English

WCF,MSMQ-不支持协议“ net.msmq”

[英]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. 尝试在Visual Studio中添加对WCF服务的服务引用时,出现错误“不支持协议'net.msmq'”。

I have successfully ran appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] 我已经成功运行了appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] and I can see the configuration in the applicationHost.config file. appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] ,我可以在applicationHost.config文件中看到配置。 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)? 由于我在Visual Studio中运行服务,是否需要为特定应用程序启用net.msmq协议(appcmd设置应用程序“默认网站/MsmqService”/enabledProtocols:net.msmq)? Im not sure how to do this since my service is running in visual studio? 由于我的服务正在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>

You need to enable the component "Microsoft Message Queue (MSMQ) Server" (1) and add "net.MSMQ" protocol in your application on IIS (2). 您需要启用组件“ Microsoft Message Queue(MSMQ)服务器”(1),并在IIS上的应用程序中添加“ net.MSMQ”协议(2)。

  1. Go to "Program and Features" in "Turn Windows features on or off" checked components under "Microsoft Message Queue (MSMQ) Server". 转到“ Microsoft Message Queue(MSMQ)服务器”下的“打开或关闭Windows功能”中选中的组件中的“程序和功能”。

  2. Go to application on IIS, click "Advanced Settings" then "Enabled Protocols" add this ",net.MSMQ". 转到IIS上的应用程序,单击“高级设置”,然后“启用协议”添加此“,net.MSMQ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM