HTTP/1.1 415 Cannot process the message because the content type 'application/soap+msbin1' was not the expected type '

可是出现下列错误:HTTP/1.1 415 Cannot process the message because the content type 'application/soap+msbin1' was not the expected type 'application/soap+xml; charset=utf-8'.服务器端的终结点的绑定和客户端的终结点的绑定不一致导致的,我服务端发布的WCF服务的终结点的binding是wsHTTPBinding,而SL客户端代理类调用时配置的Binding是custombinding,确实是不一致的,但好像SL3.0客户端配置里不支持wsHTTPBinding,好像只支持customBinding和basicHttpBinding,于是我把服务端和客户端的binding都改成了basicHttpBinding,然后重新发布服务端,更新客户端服务引用,运行SL程序,调用WCF服务,成功了

原文地址:https://www.cnblogs.com/cuihongyu3503319/p/2245954.html