首页 新闻 会员 周边

如何基于https调用WCF服务

0
悬赏园豆:30 [待解决问题]

之前能正常调用的WCF服务,从http改为https之后,调用出现如下的错误:

System.ServiceModel.ProtocolException: The content type text/html; 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. The first 1024 bytes of the response were: '<HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE>
<TITLE>Service</TITLE></HEAD><BODY>
<DIV id="content">
<P class="heading1">Service</P>
<BR/>
<P class="intro">This is a Windows&#169; Communication Foundation ser'.
wcf
dudu的主页 dudu | 高人七级 | 园豆:30994
提问于:2016-08-18 17:34
< >
分享
所有回答(2)
0

记得好像今天有个人问过这个。。。这是说什么Content-Type不匹配?

https://q.cnblogs.com/q/85248/

顾晓北 | 园豆:10844 (专家六级) | 2016-08-18 17:36
0

哈哈哈哈哈哈哈哈哈哈 

哈哈哈哈哈哈哈哈

哈哈哈哈哈

dudu跑出来问问题了。

waiter | 园豆:1000 (小虾三级) | 2016-08-18 17:46
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册