I've been reading for hours posts related with "The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)" issue But non of them seem to solve my problem.
Let me explain:
I have an ajax call to a WCF method which returns a json object.
ok now my wcf service is located in the same app (don't ask me why):
this is the unique web.config that the app has.
<services>
<service behaviorConfiguration="defaultBehavior" name="HSMobileApp.Services.HSMobile">
<endpoint address="pox" behaviorConfiguration="poxBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="HSMobileApp.Services.IHSMobile" />
<host>
<baseAddresses>
<add baseAddress="/Services/HSMobile" />
</baseAddresses>
</host>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="webBinding" />
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="poxBehavior">
<webHttp defaultOutgoingResponseFormat="Xml" />
</behavior>
<behavior name="jsonBehavior">
<webHttp defaultOutgoingResponseFormat="Json" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="defaultBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
So, my ajax calls the svc that I'm hosting in the same application, In the Visual Studio 2010 environment works fine, but when I try to debug it on the IIS this is what I got after reaching the WCF method.
"Associate":0,"MenuOptions":"The content type text/html of the response message does not match the content type of the binding (application/soap+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:...
I know this must be somekind of binding o IIS situation but I don't know where to look at, because my server web.config is the same that the client web.config
I'm working in a Windows 7 Enterprise, IIS 7.5, VS2010 and jquery 1.6.2
Please help me!!