小编use*_*609的帖子

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

当我尝试在Visual Studio中向我的WCF服务添加服务引用时,我收到错误"不支持协议'net.msmq'.

我已成功运行appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost'] ,我可以在applicationHost.config文件中看到配置.由于我在visual studio中运行我的服务,我是否需要为我的特定应用程序启用net.msmq协议(appcmd set app"Default Web Site/MsmqService"/enabledProtocols:net.msmq)?我不知道怎么做,因为我的服务是在visual studio中运行的?如果我不需要这样做,还有什么可能是问题.这是我的配置.任何帮助赞赏..

<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>
Run Code Online (Sandbox Code Playgroud)

wcf msmq

7
推荐指数
1
解决办法
5619
查看次数

标签 统计

msmq ×1

wcf ×1