日期:2014-05-17  浏览次数:20380 次

web.config文件报错
错误列表: 

  每个配置文件中只允许存在一个 <configSections> 元素,并且,如果存在该元素,它还必须是根 <configuration> 元素的第一个子元素。 D:\OAsys\web.config



<configuration>
  <appSettings>
  <add key="conStr" value="Server=(local);database=db_OAS;Uid=sa;Pwd="/>
  </appSettings>
  <connectionStrings/>
  <system.web>
  <pages validateRequest="false"></pages>
  <httpRuntime maxRequestLength="102400" executionTimeout="60" appRequestQueueLimit="100"/>
  </system.web>
  <configSections>


------解决方案--------------------
不是说的很清楚吗,configSections必须是configuration的第一个子元素,放第一个
<configuration>
<configSections/>
<appSettings>
<add key="conStr" value="Server=(local);database=db_OAS;Uid=sa;Pwd="/>
</appSettings>
<connectionStrings/>
<system.web>
<pages validateRequest="false"></pages>
<httpRuntime maxRequestLength="102400" executionTimeout="60" appRequestQueueLimit="100"/>
</system.web>

------解决方案--------------------
<configuration>
<configSections/>
<appSettings>
.....
</appsettings>
</configuration>
------解决方案--------------------
探讨
错误列表:

每个配置文件中只允许存在一个 <configSections> 元素,并且,如果存在该元素,它还必须是根 <configuration> 元素的第一个子元素。 D:\OAsys\web.config



<configuration>
<appSettings>
<add key="conStr" value="Server=(local)……

------解决方案--------------------
错误说明的很清楚了。只能有一个节点configSections,并且只能是根节点啊

http://msdn.microsoft.com/zh-cn/library/ms228256.aspx