C# 绑定失败的间歇性内容类型
我使用WCF多次向web服务发送相同的请求,我的一些请求失败,并显示以下错误消息C# 绑定失败的间歇性内容类型,c#,web-services,wcf,character-encoding,wcf-binding,C#,Web Services,Wcf,Character Encoding,Wcf Binding,我使用WCF多次向web服务发送相同的请求,我的一些请求失败,并显示以下错误消息 The content type text/xml;UTF-8; 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 IsContentTypeSupport
The content type text/xml;UTF-8; 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
当我用Fiddler检查成功和失败尝试的原始消息时,我发现有以下区别
成功的
失败
成功观察到的消息没有传输编码和text/xml;UTF-8字段
我不确定那些额外的可能会导致错误?什么可能导致这种差异?我如何克服这个问题
HTTP/1.1 200 OK
Date: Fri, 10 Jul 2015 07:15:57 GMT
Server: unknown
Content-Length: 1502
X-Powered-By: Servlet/2.5 JSP/2.1
Content-Type: text/xml; charset=utf-8
HTTP/1.1 200 OK
Date: Fri, 10 Jul 2015 07:16:03 GMT
Server: unknown
X-Powered-By: Servlet/2.5 JSP/2.1
Transfer-Encoding: chunked
Content-Type: text/xml;UTF-8; charset=UTF-8