I have a WCF-supported SOAP service that I can hit from a browser, as well as from my SOAP client when making HTTP GET requests, however, when making any HTTP POST requests, the response is 404 Not Found.
My Web.config looks like this:
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <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 markup using a .svc file as:
<%@ ServiceHost Language="C#" Debug="true" Service="Boca.WebServices.Billing.QBService" CodeBehind="QBService.svc.cs" %>
Again, I can use my service using a browser and a SOAP client, as follows, using HTTP GET, but not with HTTP POST:
What am I doing wrong? Should I use .svc markup and just define my service in Web.config?
UPDATE:
When I "start debugging" my WCF project from VS 2010 using IIS Express on the localhost port: 8181, HTTP POSTS for the service to work. This is only when the service is hosted through IIS, the HTTP POST for the service is rejected or not found.
source share