日期:2014-05-16  浏览次数:20924 次

客户端发现响应内容类型为“text/html”,但应为“text/xml”。
有两个网站,网站之间是通过web service传输数据的,但是现在出现了下面的问题,有知道怎么解决的高手帮个忙咯
客户端发现响应内容类型为“text/html”,但应为“text/xml”。
请求失败,错误信息为:
--
<html>
  <head>
     <title>??????????????????
</title>
  </head>
  <body>
     <h1><font face=Verdana color=#ff3300>??????????????????????????????
</font></h1>
     <p>
     <font face=Verdana>
       ??????????????? Web ????????????????????? Web ??????????????????????????????????????? Web ??????????????????????????????????????????????????????
</p>
  <p>
  <b>?????????????????????:
</b> ?????????????????????????????????????????????????????? Web ?????????????????????????????????????????????????????????????????????????????????????????????????????????
</p>
  </body>
</html>

--. 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.InvalidOperationException: 客户端发现响应内容类型为“text/html”,但应为“text/xml”。
请求失败,错误信息为:
--
<html>
  <head>
     <title>??????????????????
</title>
  </head>
  <body>
     <h1><font face=Verdana color=#ff3300>??????????????????????????????
</font></h1>
     <p>
     <font face=Verdana>
       ??????????????? Web ????????????????????? Web ??????????????????????????????????????? Web ??????????????????????????????????????????????????????
</p>
  <p>
  <b>?????????????????????:
</b> ?????????????????????????????????????????????????????? Web ?????????????????????????????????????????????????????????????????????????????????????????????????????????
</p>
  </body>
</html>

--.

源错误: 


行 607:        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SelectKaoshengjbxxByOrder", RequestNamespace="http://t****ri.org/", ResponseNamespace="http://t****ri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
行 608:        public System.Data.DataSet SelectKaoshengjbxxByOrder(string condition, int pageIndex, int pageSize, string order) {
行 609:            object[] results = this.Invoke("Select********ByOrder", new object[] {
行 610:                        condition,
行 611:                        pageIndex,
 

源文件: E:\Project2012\**\Exa***Lib\Web References\****WebService\Reference.cs    行: 609