WCF Web服务错误 [英] WCF Web Service Error

查看:91
本文介绍了WCF Web服务错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助您解决以下错误.

错误消息:
响应消息的内容类型文本/纯文本与绑定的内容类型不匹配(文本/xml; charset = utf-8).如果使用自定义编码器,请确保正确实施IsContentTypeSupported方法.响应的前0个字节为:''''.

Can you please help about the below error.

Error Message:
The content type text/plain 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. The first 0 bytes of the response were: ''''.

推荐答案

我想这是配置文件存在的问题-端点绑定
绑定应该是wsHttpBinding

您能否快速浏览一下您在端点中设置的绑定值

I guess, it is a problem with config file - Endpoint binding
The binding should be wsHttpBinding

Could you please have a quick look into the binding value you set in endpoint

<endpoint>
         address="" 
         behaviorConfiguration="httpBehavior" 
         binding="webHttpBinding" bindingConfiguration="testWebHttpBinding" 
         contract="[your contract name]" />
</endpoint>



希望这能解决您的问题

欢呼



Hope this solves your problem

cheers


这篇关于WCF Web服务错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆