title: WCF charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)
body: <p>I'm hosting a WCF service in IIS 7.5 using .NET 4.0.  I also have a WPF application that I am using as my client that was built with Visual Studio 2010 and .NET 4.0.  I added my service reference and when I attempt to call a function, I get the following exception</p>
  
  <blockquote>
    <p>The content type application/xml; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)</p>
  </blockquote>
  
  <p>I am able to navigate to the service in a web browser and my bindings appear to be the same between the client and service (WsHttp bindings).</p>
  
  <p>I know there are alot of google results about this error but none of them seemed to be relevant/help my specific problem.  I tried installing Non-HTTP Activation features as well as a wide variety of other small tricks.  Anybody be able to help?  Thanks</p>
  
  <p>edit, here are my configs (they are quite lengthy)</p>
  
  <p>Client</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
     &lt;system.serviceModel&gt;
        &lt;bindings&gt;
           &lt;basicHttpBinding&gt;
               &lt;binding name="ContentSoap" 
                   closeTimeout="00:01:00" openTimeout="00:01:00"
                   receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                   bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
                   maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 
                   maxReceivedMessageSize="2147483647"
                   messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                   useDefaultWebProxy="true"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" 
                                maxArrayLength="2147483647"
                                maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="None" proxyCredentialType="None"
                                 realm="" /&gt;
                      &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
                  &lt;/security&gt;
               &lt;/binding&gt;
               &lt;binding name="OrderSoap" 
                   closeTimeout="00:01:00" openTimeout="00:01:00"
                   receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                   bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                   maxBufferSize="65536" maxBufferPoolSize="524288" 
                   maxReceivedMessageSize="65536"
                   messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                   useDefaultWebProxy="true"&gt;
                 &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" 
                               maxArrayLength="16384" maxBytesPerRead="4096" 
                               maxNameTableCharCount="16384" /&gt;
                 &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="None" proxyCredentialType="None"
                                 realm="" /&gt;
                      &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
                 &lt;/security&gt;
             &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
          &lt;netTcpBinding&gt;
             &lt;binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00"
                 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                 transactionFlow="false" transferMode="Buffered"  
                 transactionProtocol="OleTransactions"
                 hostNameComparisonMode="StrongWildcard" listenBacklog="10"  
                 maxBufferPoolSize="2147000000" maxBufferSize="65536" maxConnections="10" 
                 maxReceivedMessageSize="2147000000"&gt;
                &lt;readerQuotas maxDepth="32" maxStringContentLength="8192"  
                     maxArrayLength="2147000000" maxBytesPerRead="4096" 
                     maxNameTableCharCount="16384" /&gt;
                &lt;reliableSession ordered="true" inactivityTimeout="00:01:00"
                                 enabled="true" /&gt;
                &lt;security mode="None"&gt;
                   &lt;transport clientCredentialType="Windows" 
                              protectionLevel="EncryptAndSign" /&gt;
                   &lt;message clientCredentialType="Windows" /&gt;
                &lt;/security&gt;
             &lt;/binding&gt;
         &lt;/netTcpBinding&gt;
         &lt;wsHttpBinding&gt;
              &lt;binding name="WSHttpBinding_IInmateCanteenServiceWeb" 
                   closeTimeout="00:01:00" openTimeout="00:01:00" 
                   receiveTimeout="00:10:00" sendTimeout="00:01:00"
                   bypassProxyOnLocal="false" transactionFlow="false"  
                   hostNameComparisonMode="StrongWildcard"
                   maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
                   messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
                   allowCookies="false"&gt;
                &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" 
                     maxArrayLength="16384" maxBytesPerRead="4096" 
                     maxNameTableCharCount="16384" /&gt;
                &lt;reliableSession ordered="true" inactivityTimeout="00:10:00"
                     enabled="false" /&gt;
                &lt;security mode="Transport"&gt;
                    &lt;transport clientCredentialType="None" proxyCredentialType="None"
                               realm="" /&gt;
                &lt;/security&gt;
            &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
     &lt;/bindings&gt;
     &lt;client&gt;
         &lt;endpoint name="ContentSoap"
             address="http://media.team.twvending.net/storeservices/content.asmx"
             binding="basicHttpBinding" bindingConfiguration="ContentSoap"
             contract="MediaPortContent.ContentSoap"  /&gt;
         &lt;endpoint name="OrderSoap"
             address="http://media.team.twvending.net/storeservices/order.asmx"
             binding="basicHttpBinding" bindingConfiguration="OrderSoap"
             contract="MediaPortOrder.OrderSoap"  /&gt;
         &lt;endpoint name="NetTcpBindingEndpoint" 
             address="..."
             binding="netTcpBinding" bindingConfiguration="NetTcpBindingEndpoint"
             contract="WebCallBack.ICallbackService" /&gt;
         &lt;endpoint name="WSHttpBinding_IInmateCanteenServiceWeb" 
             address="..."
             binding="wsHttpBinding"  
             bindingConfiguration="WSHttpBinding_IInmateCanteenServiceWeb"
             contract="InmateCanteenWeb.IInmateCanteenServiceWeb" /&gt;
         &lt;endpoint name="WSHttpBinding_ICommAccountingBinding" 
             address="..."
             binding="wsHttpBinding" 
             bindingConfiguration="WSHttpBinding_IInmateCanteenServiceWeb"
             contract="CommAccountingWeb.ICommAccountingWeb" /&gt;
     &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>and Server</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;behaviors&gt;
          &lt;endpointBehaviors&gt;
              &lt;behavior name="httpBehavior"&gt;
                  &lt;!--&lt;webHttp /&gt;--&gt;
              &lt;/behavior&gt;
          &lt;/endpointBehaviors&gt;
          &lt;serviceBehaviors&gt;
             &lt;behavior name="ServiceBehavior"&gt;
                &lt;serviceCredentials&gt;
                    &lt;clientCertificate&gt;
                       &lt;authentication revocationMode="NoCheck" /&gt;
                    &lt;/clientCertificate&gt;
                    &lt;serviceCertificate findValue="CN=secure.inmatecanteen.com" /&gt;
                &lt;/serviceCredentials&gt;
                &lt;serviceMetadata httpsGetEnabled="true" /&gt;
                &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
             &lt;/behavior&gt;
             &lt;behavior name="MexBehavior"&gt;
                 &lt;serviceMetadata httpsGetEnabled="true" /&gt;
                 &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
             &lt;/behavior&gt;
             &lt;behavior name="HttpMexBehavior"&gt;
                  &lt;serviceMetadata httpsGetEnabled="true" /&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
             &lt;/behavior&gt;
             &lt;behavior name="BasicHttpMexBehavior"&gt;
                &lt;serviceMetadata httpGetEnabled="true" /&gt;
                &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
             &lt;/behavior&gt;
             &lt;behavior name=""&gt;
                  &lt;serviceMetadata httpsGetEnabled="true" /&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
             &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
        &lt;/behaviors&gt;
        &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="false" 
                                   multipleSiteBindingsEnabled="true" /&gt;
        &lt;bindings&gt;
           &lt;wsHttpBinding&gt;
              &lt;binding name="myWsHttpBinding" maxBufferPoolSize="2147483647" 
                  maxReceivedMessageSize="2147483647" messageEncoding="Text"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" 
                         maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
                         maxNameTableCharCount="2147483647" /&gt;
                  &lt;security mode="Transport"&gt;
                      &lt;transport clientCredentialType="None" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
           &lt;/wsHttpBinding&gt;
           &lt;webHttpBinding&gt;
               &lt;binding name="myWebHttpBinding"&gt;
                  &lt;security mode="Transport"&gt;
                     &lt;transport clientCredentialType="None" proxyCredentialType="None" 
                               realm=""  /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
           &lt;/webHttpBinding&gt;
           &lt;basicHttpBinding&gt;
               &lt;binding name="myBasicHttpBinding" maxBufferPoolSize="2147483647" 
                   maxReceivedMessageSize="2147483647"&gt;
                   &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" 
                          maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
                          maxNameTableCharCount="2147483647" /&gt;
               &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
       &lt;/bindings&gt;
       &lt;services&gt;
           &lt;service name="CommAccountingWeb.CommAccountingWeb"  
                    behaviorConfiguration="HttpMexBehavior"&gt;
               &lt;endpoint 
                   address="" 
                   behaviorConfiguration="httpBehavior" 
                   binding="webHttpBinding" bindingConfiguration="myWebHttpBinding" 
                   contract="CommAccountingWeb.ICommAccountingWeb" /&gt;
               &lt;endpoint 
                   address="mex"
                   binding="mexHttpsBinding" 
                   contract="IMetadataExchange"  /&gt;
               &lt;host&gt;
                  &lt;baseAddresses&gt;
                      &lt;add baseAddress="..."&gt;&lt;/add&gt;
                  &lt;/baseAddresses&gt;
               &lt;/host&gt;
           &lt;/service&gt;
           &lt;service name="CommAccountingWeb.CommAccountingBasic" 
                    behaviorConfiguration="BasicHttpMexBehavior"&gt;
              &lt;endpoint 
                  address="" 
                  binding="basicHttpBinding" 
                  bindingConfiguration="myBasicHttpBinding" 
                  contract="CommAccountingWeb.ICommAccountingBasic" /&gt;
              &lt;endpoint 
                  address="mex"
                  binding="mexHttpBinding"  
                  contract="IMetadataExchange" /&gt;
              &lt;host&gt;
                &lt;baseAddresses&gt;
                    &lt;add baseAddress="..." /&gt;
                &lt;/baseAddresses&gt;
             &lt;/host&gt;
          &lt;/service&gt;
      &lt;/services&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>