日期:2014-05-18  浏览次数:20511 次

ASP.NET 的 webconfig错误, 应用程序中的服务器错误。请求高手解决。
各位高手好,小弟是大学二年级的学生,对ASP.NET有很多不懂,最近我所在的网络部要我对学长做好的一个网站进行改编。我从办公室的服务器上把我的网站下下来。放到我的笔记本电脑运行(2003系统),但是一运行主页就出现以下错误:
“/”应用程序中的服务器错误。
--------------------------------------------

配置错误 
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 

分析器错误信息: 无法识别的配置节“connectionStrings”
源错误: 


行 13: <add key="buzhu" value="开启" />
行 14: </appSettings>
行 15: <connectionStrings>行 16: <add name="qgzxConnectionString1" connectionString="Data Source=zuojun;Initial Catalog=qgzx;Persist Security Info=True;User ID=sa;MultipleActiveResultSets=False;Packet Size=4096;Application Name=&quot;Microsoft SQL Server Management Studio&quot;" providerName="System.Data.SqlClient" />
行 17: </connectionStrings>
 

源文件: c:\inetpub\wwwroot\qgzx\web.config 行: 15 


--------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2379; ASP.NET 版本:1.1.4322.2379 

网站在办公室运行良好

我的网站是用ASP2.0编的但这里显示的是1.0是不是这个问题,但是我也安装了framework2.0呀。


我的webconfig文件为:





<?xml version="1.0"?>
<!-- 
  注意: 除了手动编辑此文件以外,您还可以使用 
  Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
  “网站”->“Asp.Net 配置”选项。
  设置和注释的完整列表在 
  machine.config.comments 中,该文件通常位于 
  \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
  <appSettings>
  <add key="modify" value="开启" />
  <add key="buzhu" value="开启" />
  </appSettings>
  <connectionStrings>
  <add name="qgzxConnectionString1" connectionString="Data Source=zuojun;Initial Catalog=qgzx;Persist Security Info=True;User ID=sa;MultipleActiveResultSets=False;Packet Size=4096;Application Name=&quot;Microsoft SQL Server Management Studio&quot;" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
  <sessionState timeout="45" />
  <!-- 
  设置 compilation debug="true" 将调试符号插入
  已编译的页面中。但由于这会 
  影响性能,因此只在开发过程中将此值 
  设置为 true。
  -->
  <compilation debug="true">
  <assemblies>
  <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
  </assemblies>
  </compilation>
  <!--
  通过 <authentication> 节可以配置 ASP.NET 使用的 
  安全身份验证模式,
  以标识传入的用户。 
  -->
  <authentication mode="Windows" />
  <!--
  如果在执行请求的过程中出现未处理的错误,
  则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
  开发人员通过该节可以配置
  要显示的 html 错误页
  以代替错误堆栈跟踪。

  <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
  <error statusCode="403" redirect="NoAccess.htm" />
  <error statusCode="404" redirect="FileNotFound.htm" />
  </customErrors>
  -->
  <httpRuntime maxRequestLength="10240" />
  </system.web>
</configura