title: IMetaDataExchange could not be found in the list of contracts implemented by the service
body: <p>I have searched the web for resolution of this error, but everything I have found suggests what I have is correct.</p>
  
  <p>Maybe someone could take a look and spot an obvious mistake I just cannot see.</p>
  
  <p>I have a windows service, hosting two contracts:</p>
  
  <ol>
  <li>IConfigurationService</li>
  <li>IConfigurationAdminService</li>
  </ol>
  
  <p>The admin service inherits from the standard service as I want both contracts to implement the basic methods.</p>
  
  <p>The problem is I can host the services fine, until I try and add a MEX.</p>
  
  <p>Then I get the following exception:</p>
  
  <blockquote>
    <p>The contract name 'IMetaDataExchange' could not be found in the list of contracts implemented by the service 'ConfigurationWCFService'.</p>
  </blockquote>
  
  <p>And this is my config, everything is configured by config, nothing done through code.</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;netTcpBinding&gt;
          &lt;binding name="tcpBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt;
            &lt;readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" /&gt;
            &lt;security mode="None" /&gt;
          &lt;/binding&gt;
        &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="serviceBehavior" name="BrightsideGroup.Repa.Configuration.ConfigurationWCFService"&gt;
          &lt;endpoint address="ConfigurationService" binding="netTcpBinding"
            bindingConfiguration="tcpBinding" name="tcpConfiguration" contract="BrightsideGroup.Repa.Configuration.IConfigurationWCFService" /&gt;
          &lt;endpoint binding="mexHttpBinding" address="mex" name="mex" contract="IMetaDataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="net.tcp://GD01316:9123/Repa" /&gt;
              &lt;add baseAddress="http://GD01316:8123/Repa" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
        &lt;service behaviorConfiguration="serviceBehavior" name="BrightsideGroup.Repa.Configuration.ConfigurationWCFAdminService"&gt;
          &lt;endpoint address="ConfigurationAdminService" binding="netTcpBinding"
            bindingConfiguration="tcpBinding" name="tcpConfigurationAdmin"
            contract="BrightsideGroup.Repa.Configuration.IConfigurationAdminWCFService" /&gt;
          &lt;endpoint binding="mexHttpBinding" address="mex" name="mex" contract="IMetaDataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="net.tcp://GD01316:9124/Repa" /&gt;
              &lt;add baseAddress="http://GD01316:8124/Repa" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="serviceBehavior"&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>