【问题标题】:net.msmq not recognised for a WCF serviceWCF 服务无法识别 net.msmq
【发布时间】:2013-09-12 14:56:10
【问题描述】:

尝试启动托管 WCF 服务的 Windows 服务时出现以下错误:

找不到与具有绑定 NetMsmqBinding 的端点的方案 net.msmq 匹配的基地址。注册的基地址方案是 [http]。

如果我删除 netmsmq 绑定并使用 basichttp 绑定,则可以正常工作。配置如下:

  <system.serviceModel>
    <services>
      <service name="ManageContactService.ManageContact" behaviorConfiguration="ContactServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8888/ManageContact/ContactService"/>
          </baseAddresses>
        </host>

        <endpoint address="net.msmq//localhost/private/testqueue" binding="netMsmqBinding" 
                  bindingConfiguration="MyMsmqBinding" contract="ManageContactService.IManageContact" />

        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      </service>
    </services>
    <bindings>
      <netMsmqBinding>
        <binding name="MyMsmqBinding">
          <security mode="None"></security>
        </binding>
      </netMsmqBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ContactServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="False"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

【问题讨论】:

    标签: c# wcf msmq


    【解决方案1】:

    你需要一个冒号:

    net.msmq://localhost/private/testqueue

    【讨论】:

      猜你喜欢
      • 2010-11-14
      • 1970-01-01
      • 2015-04-15
      • 2015-05-27
      • 1970-01-01
      • 1970-01-01
      • 2023-03-24
      • 2015-12-12
      • 2017-06-21
      相关资源
      最近更新 更多