title: WCF: The contract 'X' in client configuration does not match the name in service contract
body: <p>This error message shows when I try run my WCF service in VS, and I'm trying to figure out what it's actually referring to by 'client configuration' and 'service contract':</p>
  
  <p><em>The contract 'IMyService' in client configuration does not match the name in service contract</em></p>
  
  <p>I assume the <strong>service contract</strong> part refers to this:</p>
  
  <pre><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  [System.ServiceModel.ServiceContractAttribute(Namespace = "http://xxx/yyy", ConfigurationName = "IMyService")]
  public interface IMyService
  {
      // CODEGEN: Generating message contract since the operation MyService is neither RPC nor document wrapped.
      [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")]
      [System.ServiceModel.XmlSerializerFormatAttribute()]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Task))]
      SendResponse Request(SendRequest request);
  }
  </code></pre>
  
  <p>Any ideas what the <strong>client configuration</strong> refers to?</p>
  
  <p>Edit: In my web.config I have this section for system.serviceModel:</p>
  
  <pre><code> &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="MyServiceBinding"&gt;
            &lt;security mode="None" /&gt;
          &lt;/binding&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;services&gt;
        &lt;service name="XXX.YYY.MyService"&gt;
          &lt;endpoint binding="basicHttpBinding" bindingConfiguration="MyServiceBinding" name="MyServiceSendHttps"
            contract="IMyService" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
  </code></pre>