I have a simple console application which runs as a WCF service host. bsicHttpBinding is used. When I try to get the service reference in my client ( another console app) I get this error
"There was an error downloading http:// localhost:9999/TS. The request failed with HTTP status 400: Bad Request. Metadata contains a reference that cannot be resolved: 'http:// localhost:9999/TS'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:9999/TS. The client and service bindings may be mismatched. The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. If the service is defined in the current solution, try building the solution and adding the service reference again."
Please provide any pointers.
App.config:
<configuration>
<system.serviceModel>
<services>
<service
name="TimeServiceLibrary.TimeService"
behaviorConfiguration="TSConfig">
<endpoint address="localhost:9999/TS"
binding="basicHttpBinding"
contract="TimeServiceLibrary.ITime">
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="TSConfig">
<serviceMetadata httpGetEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>