简体   繁体   中英

System.Configuration.ConfigurationErrorsException: 'Configuration system failed to initialize'

All works fine but suddenly i get this error. Connection string automatically generated by program.

在此处输入图片说明

This is my App.config file i didn't change anything. DB file is on the same place like it was. Any suggestion?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
    <add name="FBAutoPost.Properties.Settings.FBGroupAutoPostDBConnectionString"
        connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Resources\FacebookGroupAutoPostDB.accdb"
        providerName="System.Data.OleDb" />
</connectionStrings>
   <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
   </startup>
</configuration>

The exception popup shows the "Inner Exception":

ConfigurationErrorsException: Unrecognized configuration section userSettings.

It's reading a config file with a "userSettings" configuration section in it. It looks like it's not reading the config file that you think it is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM