使用了微软企业库的应用程序配置文件配置注意事项,
一定要注意把configSections节点和connectionStrings节点放在最前面,并且一定要在appSettings节点之前,否则会报配置错误。
<configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=null" requirePermission="true" /> </configSections> <dataConfiguration defaultDatabase="dbOracle" /> <connectionStrings> <add name="dbOracle" connectionString="user id=dzjz;data source=server14;password=dzjz" providerName="System.Data.OracleClient" /> </connectionStrings> <appSettings> <add key="process" value="auto" /> </appSettings>