I've got a WCF Service running on my local IIS server. I've added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automatically.
However, when I try and call any of the service contracts, I get the following error:
Description: An unhandled exception occurred during the
execution of the current web request.
Please review the stack trace for more
information about the error and where
it originated in the code.
Exception Details: System.ServiceModel.ProtocolException:
The content type text/html;
charset=utf-8 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: '
function
bredir(d,u,r,v,c){var w,h,wd,hd,bi;var
b=false;var p=false;var
s=[[300,250,false],[250,250,false],[240,400,false],[336,280,false],[180,150,false],[468,60,false],[234,60,false],[88,31,false],[120,90,false],[120,60,false],[120,240,false],[125,125,false],[728,90,false],[160,600,false],[120,600,false],[300,600,false],[300,125,false],[530,300,false],[190,200,false],[470,250,false],[720,300,true],[500,350,true],[550,480,true]];if(typeof(window.innerHeight)=='number'){h=window.innerHeight;w=window.innerWidth;}else
if(typeof(document.body.offsetHeight)=='number'){h=document.body.offsetHeight;w=document.body.offsetWidth;}for(var
i=0;i
I also have a console application which also communicates with the WCF Service and the console app is able to call methods fine without getting this error.
Below are excerpts from my config files.
This is my first attempt at creating a WCF so it's all very new. Any help is much appreciated.