title: Exception while calling an ASP.NET Web Service using WCF
body: <p>I have a WCF client which calls an ASP.NET web service in a different project. I get the following error message:</p>
  
  <blockquote>
    <p>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction <a href="http://localhost/IMyWebService/MeMethod" rel="nofollow noreferrer">http://localhost/IMyWebService/MeMethod</a></p>
  </blockquote>
  
  <p><strong>Web Service code</strong>:</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [System.ComponentModel.ToolboxItem(false)]
  [System.Web.Script.Services.ScriptService]
  public class MyWebService : System.Web.Services.WebService, IMyWebService
  {
      [WebMethod]
      public string MyMethod() {return "";}
  
  }
  
  public interface IMyWebService
  {
     string MyMethod();
  }
  </code></pre>
  
  <p><strong>WCF client code:</strong></p>
  
  <pre><code>[ServiceContract]
  public interface IMyWCFService
  {
      [OperationContractAttribute(Action = "http://localhost/IMyWebService/MeMethod")]
      string MyMethod();
  }
  </code></pre>
  
  <p>Does anyone know what the problem is.</p>
  
  <p>Thanks</p>