While implementing a WCF client endpoint, my config file had the following endpoint entry:
<endpoint address="http://localhost/MyProject/Services/MyService.svc/MyService"
binding="basicHttpBinding"
contract="MyNamespace.IContract" />
At this point the service is NOT hosted in IIS. Essentially, I am using Cassini to call through to the app. This configuration works fine. However, if I remove the /Myservice element and my config looks like this:
<endpoint address="http://localhost/MyProject/Services/MyService.svc"
binding="basicHttpBinding"
contract="MyNamespace.IContract" />
I get the following exception:
System.ServiceModel.ProtocolException: Content Type text/xml; charset=utf-8 was not supported by service. The client and service bindings may be mismatched
Why does the second config breaks while the first one works? What's so special about the /MyService part of the url?
Thanks!