0
I am trying to use both tcp as well as msmq but it gives an error msmq doesn't support dual binding or it's not properly configured, how to solve this issue? 
I have created two end points. 

I tried to do something like this 



  <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="Binding_Config" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:02:30">
          <security mode="None">
            <transport clientCredentialType ="None" protectionLevel="None"></transport>
            <message clientCredentialType="None"/>
          </security>
        </binding>
      </netTcpBinding>

      <netMsmqBinding>
        <binding name="ServiceBinding" durable="true" exactlyOnce="true" useActiveDirectory="false" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:02:30" >
          <security mode="None">
            <transport
               msmqAuthenticationMode="None"
               msmqProtectionLevel="None"

              />
          </security>
        </binding>
      </netMsmqBinding>
    </bindings>

    <services>
      <service name="WCFLib.SignalService"
        behaviorConfiguration = "SignalServiceMEXBehavior">
        <endpoint address ="TradeSignalService"
        binding="netTcpBinding"
        contract="TradeServiceLib.ITradeSignalService" bindingConfiguration="Binding_Config"/>
        <!-- Enable the MEX endpoint -->

        <!-- Need to add this so MEX knows the address of our service -->


        <endpoint  address="net.msmq://localhost/private/FirstQueue" binding="netMsmqBinding" contract="TradeServiceLib.ITradeSignalService" bindingConfiguration="ServiceBinding"/>
        <!--<endpoint address="mex" binding="netTcpBinding" contract="IMetadataExchange"/>-->


        <host>
          <baseAddresses>
            <add baseAddress ="http://192.168.1.125:2344"/>
            <add baseAddress ="net.tcp://192.168.1.125:2348"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <!-- A behavior definition for MEX -->
    <behaviors>
      <serviceBehaviors>
        <behavior name="SignalServiceMEXBehavior" >
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

  <connectionStrings>
    <clear />

  </connectionStrings>

</configuration>

I am not sure where I am wrong. 

I don't know why but this site needs more text from me so typing this line, please ignore this I don't know why but this site needs more text from me so typing this line, please ignore this I don't know why but this site needs more text from me so typing this line, please ignore this I don't know why but this site needs more text from me so typing this line, please ignore this I don't know why but this site needs more text from me so typing this line, please ignore this

2
  • you should share your code or web.config in order to someone help you. Jul 15, 2016 at 14:52
  • 1
    Okay, thanks for advice.
    – User
    Jul 16, 2016 at 4:39

1 Answer 1

0

Those two bindings are very different. You need two endpoints for the same service exposed at different addresses and set up with different bindings.

See this MSDN article for more information on this.

As an example:

<service 
    name="Microsoft.ServiceModel.Samples.CalculatorService"
    behaviorConfiguration="CalculatorServiceBehavior">
  <!-- This endpoint is exposed at the base address provided by host:
       http://localhost/servicemodelsamples/service.svc  -->
  <endpoint address=""
            binding="basicHttpBinding"
            contract="Microsoft.ServiceModel.Samples.ICalculator" />
  <!-- secure endpoint exposed at {base address}/secure:
       http://localhost/servicemodelsamples/service.svc/secure -->
  <endpoint address="secure"
            binding="wsHttpBinding"
            contract="Microsoft.ServiceModel.Samples.ICalculator" />
  ...
</service>
2
  • I am trying to do same but I am messing up somewhere with duplex thing.
    – User
    Jul 16, 2016 at 4:51
  • Should I post that client config as well?
    – User
    Jul 19, 2016 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.