突然遇到个问题:使用。net2005 前两天还是好的。今天就出现这个问题了。
客户端发现响应内容类型为“text/html; charset=utf-8”,但应为“text/xml”。
请求失败,错误信息为:
--
<html>
<head>
<title>配置错误</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.er {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head> <body bgcolor="white"> <span><H1>“/ws”应用程序中的服务器错误。<hr width=100% size=1 color=silver></H1> <h2> <i>配置错误</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> 说明: </b>在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。
<br><br> <b> 分析器错误信息: </b>未能加载文件或程序集“System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。 (K:\jit3650-2root\iis-root\new\web.config line 80)<br><br> <b>源错误:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>行 78: <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
行 79: <httpModules>
<font color=red>行 80: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
</font>行 81: <system.codedom>
行 82: <compilers></pre></code> </td>
</tr>
</table> <br> <b> 源文件: </b> K:\jit3650-2root\iis-root\new\web.config<b> 行: </b> 80
<br><br> <hr width=100% size=1 color=silver> <b>版本信息:</b> Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 </font> </body>
</html>
<!--
[ConfigurationErrorsException]: 未能加载文件或程序集“System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。 (K:\jit3650-2root\iis-root\new\web.config line 80) (K:\jit3650-2root\iis-root\new\web.config line 80)
在 System.Web.Configuration.HttpModuleAction.get_Entry()
在 System.Web.Configuration.HttpModulesSection.CreateModules()
在 System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
在 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
在 System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
在 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
--><!--
此错误页可能包含敏感信息,因为 ASP.NET 通过 <customErrors mode="Off"/> 被配置为显示详细错误信息。请考虑在生产环境中使用 <customErrors mode="On"/> 或 <customErrors mode="RemoteOnly"/>。-->
--.
客户端发现响应内容类型为“text/html; charset=utf-8”,但应为“text/xml”。
请求失败,错误信息为:
--
<html>
<head>
<title>配置错误</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.er {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head> <body bgcolor="white"> <span><H1>“/ws”应用程序中的服务器错误。<hr width=100% size=1 color=silver></H1> <h2> <i>配置错误</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> 说明: </b>在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。
<br><br> <b> 分析器错误信息: </b>未能加载文件或程序集“System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。 (K:\jit3650-2root\iis-root\new\web.config line 80)<br><br> <b>源错误:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>行 78: <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
行 79: <httpModules>
<font color=red>行 80: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
</font>行 81: <system.codedom>
行 82: <compilers></pre></code> </td>
</tr>
</table> <br> <b> 源文件: </b> K:\jit3650-2root\iis-root\new\web.config<b> 行: </b> 80
<br><br> <hr width=100% size=1 color=silver> <b>版本信息:</b> Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 </font> </body>
</html>
<!--
[ConfigurationErrorsException]: 未能加载文件或程序集“System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。 (K:\jit3650-2root\iis-root\new\web.config line 80) (K:\jit3650-2root\iis-root\new\web.config line 80)
在 System.Web.Configuration.HttpModuleAction.get_Entry()
在 System.Web.Configuration.HttpModulesSection.CreateModules()
在 System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
在 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
在 System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
在 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
--><!--
此错误页可能包含敏感信息,因为 ASP.NET 通过 <customErrors mode="Off"/> 被配置为显示详细错误信息。请考虑在生产环境中使用 <customErrors mode="On"/> 或 <customErrors mode="RemoteOnly"/>。-->
--.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货