读书人

web.config资料报错

发布时间: 2012-09-06 10:37:01 作者: rapoo

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

读书人网 >asp.net

热点推荐