开发者

Adding WCF Service Reference when using net.msmq

I have a WCF service that has an endpoint using the net:msmq binding. I am hosting this service in a managed Windows Service. When I try to add a Service reference from the client, I get the following error:

The MetadataExchangeClient instance could not be initialized

because no Binding is available for scheme 'net.msmq'. You can supply a Binding in the constructor, or specify a configurationName. Parameter name: scheme If the service is defined in the current solution, try building the solution and adding the service reference again.

The config looks like this:

<services>
  <service behaviorConfiguration="wcfservice.QueuedBehavior"
    name="wcfservice.wcfservice1">
    <endpoint address="net.msmq://machinename/private/queuname" binding="netMsmqBinding" bindingConfiguration="NewBinding0" contract="WCFService.IServiceContract" />
    <endpoint binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8009/Service" />
      </baseAddresses>
    </host>
  </service>
</services>

EDIT:

  <serviceBehaviors>
    <behavior name="wcfService.wcfServiceBehavior">
      <serviceMetadata httpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    <behavior name="wcfService.QueuedBehavior">
      <serviceMetadata ht开发者_JAVA百科tpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceThrottling/>
    </behavior>
  </serviceBehaviors>

thanks


This may be caused by binding configuration NewBinding0 being something other than netMsmqBinding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜