关于配置文件读取报错

      最近自己在写一个win服务,代码逻辑基本上处理完成了,但是在读取数据库配置文件上确报错了,后来经过查证发现是这样的问题.

在.net的配置中,节点为configSections的上面不允许有任何节点存在.在此小小记录一下.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
  </configSections>
</configuration>

 

posted @ 2015-09-21 17:22  Salo.  阅读(213)  评论(0)    收藏  举报