解决"415 Cannot process the message because the content type 'application/x-www-form-urlencoded' was not the expected type 'text/xml; charset=utf-8'"

wcf basicHttpBinding content-type    text/xml;charset=utf-8

wsHttpBinding  'application/soap+xml; charset=utf-8'

webHttpBinding 'application/x-www-form-urlencoded'   对应网页中的post请求

所以如果是post请求wcf服务,要使用webHttpBinding

posted @ 2015-03-17 11:01  二师弟tl  阅读(11570)  评论(1编辑  收藏  举报