tags:

views:

1175

answers:

1

Hi,

I'm building a WCF service that will expose BasicHttp and NetTcp bindings. I've also added two corresponding Mex endpoints, i.e.

 <service name="WCFTest.CalculatorService" behaviorConfiguration="WCFTest.CalculatorBehavior">
    <host>
      <baseAddresses>
        <add baseAddress = "http://localhost:8000/WCFTest/CalculatorService/" />
        <add baseAddress = "net.tcp://localhost:9000/WCFTest/CalculatorService/" />
      </baseAddresses>
    </host>

    <endpoint address ="basicHttpEP" binding="basicHttpBinding" contract="WCFTest.ICalculatorService"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

    <endpoint address ="netTcpEP" binding="netTcpBinding" contract="WCFTest.ICalculatorService"/>
    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>

  </service>

Do I really need to add a NetTcp Mex endpoint as well as an BasicHttp Mex endpoint? Will clients not just always use the Http mex endpoint for meta data disocvery regardless of whether they're going to communicate using tcp or not?

Thanks

+1  A: 

Yes, you can use just the HTTP mex endpoint. I think the assumption is that your client cannot communicate over HTTP.

Adam Fyles