views:

527

answers:

2

Here is the web.config for my WCF endpoint:

<services>
      <service behaviorConfiguration="SearchQueryServiceBehavior" 
       name="Search.Querier.WCF.Querier">
      <endpoint address="mex" binding="mexHttpBinding" name="mexHttpEndpoint"
        contract="IMetadataExchange" />
      <endpoint binding="netTcpBinding" bindingConfiguration="" 
       name="netTcpEndpoint"
        contract="Search.Querier.WCF.IQuerier" />
      </service>
</services>

Does it matter, if I plan to use a netTCpEndpoint do I need a mexTCPEndpoint, or can it be Http?

+1  A: 

You can have as many endpoints as you want, so I don't see how it could matter. Heck, why not be nice to the users and offer both HTTP and TCP mex bindings.

Jonathan Allen
+1  A: 

You can only expose the MEX endpoint once. If you expose it via wsHttp, then you will get an error if you try to also expose it via netTcp or any other binding. I ran into this recently, and the error that you are given when exposing the MEX endpoint more than once is quite convoluted and doesn't appear to have anything to do with MEX, so hopefully this will save you that headache. ;)

jrista