WCF/WF - about WCF binding Error - Asked By pravin on 03-Aug-10 07:44 AM

i got error while execution of windows service ,  i am not able to receive any type of responce from WCF
CE ERROR: 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'
Super Man replied to pravin on 03-Aug-10 07:55 AM
There are 4 possibilities I can think of:
  1. Some security setting that is blocking access the the service. Check you IIS log for access denied
  2. That the configuration of the services web.config has not been transfered to production
  3. That metadata exchange is not configured with http get allowed
  4. That you are using a newer binding that is not supported on IIS 6

The bindings that are supported by IIS 6 are basicHttpBinding and wsHttpBinding. See:

Goniey N (Mr. G) replied to pravin on 03-Aug-10 08:16 AM

Well, you could try using the "Silverlight-enabled WCF Service" template in VS2008, and comparing the differences? I expect that you need to use the basicHttpBinding and are using something more exotic.

For info, here is the web.config section for a default Silverlight/WCF service:




    <behavior name="MySite.Service1Behavior">

     <serviceMetadata httpGetEnabled="true" />

     <serviceDebug includeExceptionDetailInFaults="false" />




  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />


   <service behaviorConfiguration="MySite.Service1Behavior" name="MySite.Service1">

    <endpoint address="" binding="basicHttpBinding" contract="MySite.Service1" />

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />




//For More Details Refer : Click Here

//I Hope This Will Solve Your Problem....