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.
My Web.config looks like:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- 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 -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
<bindings>
<wsHttpBinding>
<binding>
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
<readerQuotas maxDepth="15" maxStringContentLength="524288" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</wsHttpBinding>
<basicHttpBinding>
<binding>
<readerQuotas maxDepth="15" maxStringContentLength="524288" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
My service is defined in the markup using the .svc file as:
<%@ ServiceHost Language="C#" Debug="true" Service="Boca.WebServices.Billing.QBService" CodeBehind="QBService.svc.cs" %>
Again, I can hit my service using the browser and a SOAP client as follows using an HTTP GET but not with HTTP POST:
What am I doing wrong? Should I not be using the .svc markup and just define my service in the Web.config?
UPDATE:
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.