<configSections> 位置引起的错误
2015-02-02 14:03
295 查看
今天在配置一个项目的时候,花了挺长时间配置完成,然后一启动项目,懵了,启动报错:错误显示
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.
Unrecognized configuration section loggingProvider
最后纠结了半天,查了很多错误原因,因为没有直接搜索configSections错误,而是直接查询的错误,导致很长时间没有查出真正的原因,最后拿了别的web.config进行对比发现<configSections>的位置是靠在最前面的。调整好了,再运行,成功了。后来在网上查询说,<configSections>节点前不允许有其它节点。所以当我把它放在中间的时候则报上面的错误。
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.
Unrecognized configuration section loggingProvider
最后纠结了半天,查了很多错误原因,因为没有直接搜索configSections错误,而是直接查询的错误,导致很长时间没有查出真正的原因,最后拿了别的web.config进行对比发现<configSections>的位置是靠在最前面的。调整好了,再运行,成功了。后来在网上查询说,<configSections>节点前不允许有其它节点。所以当我把它放在中间的时候则报上面的错误。
相关文章推荐
- (已解决)Error:(31, 29) 错误: 找不到符号 符号: 方法 setLatestEventInfo(MainActivity,String,String,<空值>) 位置: 类型为No
- <h1>读取配置文件失败</h1>这通常意味着文件中有语法错误,请检查下面显示出的错误。<br /><br /><iframe src="show_config_errors.php" />
- 错误:The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.Magic
- <a><div></div></a> 引起的错误: 块元素与内联元素
- C++ vector<int>向量越界。。。运行段错误退出但gdb未定义到错误位置
- 若要使他人能够在远程计算机上查看此特定错误消息的详细信息,请在位于当前 Web 应用程序根目录下的“web.config”配置文件中创建一个 <customErrors> 标记。然后应将此 <cust
- 开发日志:struts标签[<s:selec>/<s:submit>/<s:form>......] 在table的时候位置错误 [会自动换行/自动生成tr、td的问题]
- 20100611 学习记录:Sections must only appear once per config file. See the help topic <location> for exceptions.
- 配置<aop:config proxy-target-class="true">时遇到的错误
- <jsp:include page="${pageContext.request.contextPath}/xxx.jsp"></jsp:include> 引起引入错误
- VC 使用ADO连接数据库的问题!error C2059: 语法错误 : “<L_TYPE_raw>”
- 引起超时的原因及表解锁的方法<转>
- 关于web.config中<customErrors>节点说明
- Web.Config <customErrors> 元素
- The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.MagicAja
- 排除“使用主题 css 文件要求页上有标头控件。(例如 <head runat="server" />)”错误
- asp.net mvc 2 Could not load type 'System.Web.Mvc.ViewPage<dynamic>'错误解决办法
- 控件包含代码块(即 <% ... %>),因此无法修改控件集合错误
- WPF项目报 未能找到程序集“<程序集名>”错误的解决方法
- 使用 <context:annotation-config/> 简化配置