error Cannot process the message because the content type 'application/json' was not the expected type 'text/xml; charset=utf-8'
<p>When using firebug, I got this wired error "NetworkError: 415 Cannot process the ...xt/xml; charset=utf-8 in my asp.net project.</p>

<p>Interface is below</p>

<pre><code>[OperationContract]     
    [FaultContract(typeof(string))]
    [WebInvoke(Method="POST",  
        UriTemplate="Demand",
        BodyStyle = WebMessageBodyStyle.Bare,
        ResponseFormat=WebMessageFormat.Json)]

    ClientResponse postdemand_data(List&lt;demands&gt; demanddata);
</code></pre>

<p>web config. we use following web config file in my service </p>

<pre><code>&lt;system.web&gt;
    &lt;compilation debug="true" targetFramework="4.0" /&gt;
&lt;/system.web&gt;
&lt;system.serviceModel&gt;
    &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
            &lt;binding name="LargeWebforHttp" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt;
                &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
            &lt;/binding&gt;
            &lt;binding name="LargeWebforHttps" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt;
                &lt;readerQuotas maxDepth="2147483647" 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;/basicHttpBinding&gt;
    &lt;/bindings&gt;
    &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
            &lt;behavior name="DPintegrationHA_FromSR.Service1Behavior"&gt;
                &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpsGetUrl="" /&gt;
                &lt;serviceThrottling maxConcurrentCalls="10000" maxConcurrentSessions="10000"
            maxConcurrentInstances="10000" /&gt;
                &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt;
            &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;services&gt;
        &lt;service behaviorConfiguration="DPintegrationHA_FromSR.Service1Behavior" name="DP_ITAPEDGE_HMview_wcf.Service1"&gt;
            &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeWebforHttp" contract="DP_ITAPEDGE_HMview_wcf.IService1" name="httpPoint"&gt;
            &lt;/endpoint&gt;
            &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeWebforHttps" contract="DP_ITAPEDGE_HMview_wcf.IService1" name="httpsPoint"&gt;
            &lt;/endpoint&gt;
            &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /&gt;
        &lt;/service&gt;
    &lt;/services&gt;
&lt;/system.serviceModel&gt;
</code></pre>