I create and tested a WCF service locally and of course it works fine. I published to a shared hosting site and browsed to the wsdl and appears to be fine. But when I make a call in WP7 code to the service I get an error with a useless error message. After enabling includeExceptionDetailInFaults and WCF tracing the error reads. "System.ServiceModel.ProtocolException: Content Type application/soap+xml; charset=utf-8 was sent to a service expecting text/xml; charset=utf-8. The client and service bindings may be mismatched."
Here are parts of the web.config ...
<behaviors>
<serviceBehaviors>
<behavior name="SL_SeeYaThere_WCF.Web.SeeYaThereWCFBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug httpHelpPageEnabled ="true" includeExceptionDetailInFaults="true" />
</behavior>
<!—- other services… -->
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<!—- there is not a binding for this service should there be? -->
<!—- other services… -->
</basicHttpBinding>
</bindings>
< services>
< service behaviorConfiguration="SL_SeeYaThere_WCF.Web.SeeYaThereWCFBehavior" name="SL_SeeYaThere_WCF.Web.SeeYaThereWCF">
< endpoint address="" binding="basicHttpBinding" contract="SL_SeeYaThere_WCF.Web.ISeeYaThereWCF" />
< endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
< /service>
< !—- other services… -->
< /services>
^^ appoligize about the format. editor would not display markup correctly.
This is my first experience with WFC and it hasn’t been enjoyable. What am I doing wrong?
Thanks for your help.