title: .NET 4 WCF SOAP Service Http POST returns 404 NOT Found
body: <p>I have WCF hosted SOAP service which I'm able to hit from the browser as well as from my SOAP client fine when making HTTP GET requests, however, when doing any HTTP POST requests, the response is a 404 Not Found.</p>
  
  <p>My Web.config looks like:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior&gt;
                  &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt;
                  &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
                  &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /&gt;
      &lt;bindings&gt;
          &lt;wsHttpBinding&gt;
              &lt;binding&gt;
                  &lt;security mode="Transport"&gt;
                      &lt;transport clientCredentialType="Certificate" /&gt;
                  &lt;/security&gt;
                  &lt;readerQuotas maxDepth="15" maxStringContentLength="524288" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
              &lt;/binding&gt;
          &lt;/wsHttpBinding&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding&gt;
                  &lt;readerQuotas maxDepth="15" maxStringContentLength="524288" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
              &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>My service is defined in the markup using the .svc file as:</p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="Boca.WebServices.Billing.QBService" CodeBehind="QBService.svc.cs" %&gt;
  </code></pre>
  
  <p>Again, I can hit my service using the browser and a SOAP client as follows using an HTTP GET but not with HTTP POST:</p>
  
  <ul>
  <li><a href="http://api.mydomain.com/Billing/QBService.svc" rel="noreferrer">http://api.mydomain.com/Billing/QBService.svc</a></li>
  <li><a href="http://api.mydomain.com/Billing/QBService.svc?wsdl" rel="noreferrer">http://api.mydomain.com/Billing/QBService.svc?wsdl</a></li>
  </ul>
  
  <p>What am I doing wrong?  Should I not be using the .svc markup and just define my service in the Web.config?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>When I "start debug" my WCF project from within VS 2010 using IIS Express on a localhost:8181 port, the HTTP POSTS to the service work.  It's only when the service is hosted through IIS the HTTP POST to the service are being rejected or not found.</p>