title: The content type application/xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8), WCF
body: <p>I know this question has been asked a few times before, but the solutions given either don't work for me or I'm too ignorant to fully understand how to implement the solution.</p>
  
  <p>So, the website I am attempting to run runs off of a WCF client. Whenever a WCF service tries to be called (ie, any database search or edit), it comes up with this error</p>
  
  <blockquote>
    <p>The content type text/html; charset=utf-8 of the response message does
    not match the content type of the binding (text/xml; charset=utf-8).
    If using a custom encoder, be sure that the IsContentTypeSupported
    method is implemented properly. The first 1024 bytes of the response
    were: '</p>
  </blockquote>
  
  <p>When I make this error occur through an unhandled exception, this is what pops up</p>
  
  <p><a href="http://i.imgur.com/Vj7Baik.png" rel="nofollow">http://i.imgur.com/Vj7Baik.png</a></p>
  
  <p>(Note: the line that cuts off at the end reads)</p>
  
  <pre><code>[ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '&lt;!DOCTYPE html&gt;
  </code></pre>
  
  <p>Here is the web.config file used for the site (I'm not sure whether the problem is centered here, but I have a nagging suspicion it is)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;connectionStrings&gt;
      &lt;add name="DefaultConnection" connectionString="Data Source=localhost;Initial Catalog=DefaultConnection;Integrated Security=false;User ID=******;Password=******;"/&gt;
      &lt;add name="ITPDatabase" connectionString="Data Source=localhost;Initial Catalog=ITPDatabase;Integrated Security=false;User ID=******;Password=******;"/&gt;
    &lt;/connectionStrings&gt;
    &lt;system.web&gt;
      &lt;customErrors mode="Off"/&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Optimization" /&gt;
        &lt;/namespaces&gt;
      &lt;controls&gt;
        &lt;add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /&gt;
      &lt;/controls&gt;&lt;/pages&gt;
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/Login" defaultUrl="~/" timeout="2880" /&gt;
      &lt;/authentication&gt;
      &lt;profile defaultProvider="DefaultProfileProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/profile&gt;
      &lt;membership defaultProvider="DefaultMembershipProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
      &lt;roleManager enabled="true" defaultProvider="DefaultRoleProvider"&gt;
        &lt;providers&gt;
          &lt;add connectionStringName="DefaultConnection" applicationName="/"
            name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
      &lt;sessionState mode="InProc" customProvider="DefaultSessionProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" /&gt;
        &lt;/providers&gt;
      &lt;/sessionState&gt;
    &lt;/system.web&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
    &lt;/entityFramework&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="BasicHttpBinding_IService1" /&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="defaultServiceBehaviour"&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;endpointBehaviors&gt;
        &lt;behavior name="defaultEndpointBehaviour"&gt;
          &lt;webHttp/&gt;
        &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
      &lt;service name="*****.Service1" behaviorConfiguration="defaultServiceBehaviour"&gt;
        &lt;endpoint address="" binding="wsHttpBinding" contract="ServiceReference1.IService1"&gt;&lt;/endpoint&gt;
      &lt;endpoint address="http://&lt;domainname&gt;.com/Service1.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
          contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" /&gt;
        &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"&gt;&lt;/endpoint&gt;
  
      &lt;/service&gt;
  
      &lt;/services&gt;
  
      &lt;client&gt;
      &lt;endpoint address="http://&lt;domainname&gt;.com/Service1.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
          contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" /&gt;
        &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"&gt;&lt;/endpoint&gt;
      &lt;/client&gt;
  
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"
        multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
          &lt;handlers accessPolicy="Read, Execute, Script"&gt;
              &lt;add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" resourceType="File" preCondition="integratedMode" /&gt;  &lt;/handlers&gt;
  
      &lt;/system.webServer&gt;
  
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Now, from what I gathered of other questions, the gist of the error I'm receiving is instead of getting the xml response from the database, I'm getting a html page error. </p>
  
  <p>Before asking here I've been getting help from the web host's tech support, but at this point they're not sure what the problem is (or at least, the person who I was talking to was unsure)
  We used IIS to attempt to tinker with certain settings in the system (to no real change) so I can safely assume the site is hosting on IIS?</p>
  
  <p>Any help on the matter is greatly appeciated.</p>