客户端发现响应内容类型为“”,但应为“text/xml”
场景:客户端发现响应内容类型为“text/html”,但应为“text/xml”.解决办法
客户端发现响应内容类型为“text/html”,但应为“text/xml”.
客户端发现响应内容类型为“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>
--.
源错误:
行 5956: [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
行 5957: public byte[] selectNNPKFirstPageListDAL(string p_tableName) {
行 5958: object[] results = this.Invoke("selectNNPKFirstPageListDAL", new object[] {
行 5959: p_tableName});
行 5960: return ((byte[])(results[0]));
源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d5fca424\4baed57\App_WebReferences.hifsgxp_.0.cs 行: 5958
堆栈跟踪:
[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>
--.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533395
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
DegreeWebReference.DegreeMgr.selectNNPKFirstPageListDAL(String p_tableName) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d5fca424\4baed57\App_WebReferences.hifsgxp_.0.cs:5958
DegreeMgrInitControl.InitControl.initMyHyperlinks(Page thePage, String strLinkIDHead, String strTableName) in d:\学位系统\Degrees\App_Code\InitControl\InitControl.cs:577
Default.Page_Load(Object sender, EventArgs e) in d:\学位系统\Degrees\Default.aspx.cs:27
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
------解决方案--------------------
response.type=“text/xml"
------解决方案--------------------
估计是web service的代码出错了, 你直接在浏览器中访问webservice看看
------解决方案--------------------
你的问题解决了没有,我遇到和你一样的问题,只有我加域就出现这个问题,不用域的话就没有问题
------解决方案--------------------
我的问题解决了,呵呵重新启动了IIS
客户端发现响应内容类型为“text/html”,但应为“text/xml”.
客户端发现响应内容类型为“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>
--.
源错误:
行 5956: [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
行 5957: public byte[] selectNNPKFirstPageListDAL(string p_tableName) {
行 5958: object[] results = this.Invoke("selectNNPKFirstPageListDAL", new object[] {
行 5959: p_tableName});
行 5960: return ((byte[])(results[0]));
源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d5fca424\4baed57\App_WebReferences.hifsgxp_.0.cs 行: 5958
堆栈跟踪:
[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>
--.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533395
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
DegreeWebReference.DegreeMgr.selectNNPKFirstPageListDAL(String p_tableName) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d5fca424\4baed57\App_WebReferences.hifsgxp_.0.cs:5958
DegreeMgrInitControl.InitControl.initMyHyperlinks(Page thePage, String strLinkIDHead, String strTableName) in d:\学位系统\Degrees\App_Code\InitControl\InitControl.cs:577
Default.Page_Load(Object sender, EventArgs e) in d:\学位系统\Degrees\Default.aspx.cs:27
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
------解决方案--------------------
response.type=“text/xml"
------解决方案--------------------
估计是web service的代码出错了, 你直接在浏览器中访问webservice看看
------解决方案--------------------
你的问题解决了没有,我遇到和你一样的问题,只有我加域就出现这个问题,不用域的话就没有问题
------解决方案--------------------
我的问题解决了,呵呵重新启动了IIS