locked
Getting Configuration System Failed to Initialize error out of the blue. RRS feed

  • Question

  • All of a sudden (after several years in use) I am getting the following error:

    "Configuration System Failed to Initialize"

    The error happens on the following line of code:

    Dim StrC As string = "Integrated Security=True;Data Source=" & dbServer & ";Initial Catalog=" & dbDataBase & ";"

    My.Settings.SetUserOverride("WA_MMTP_TrackerConnectionString", strC)

    Ive seen forum messages referring to a format issue with app.config, but I don't see an issue with the file. Here is the app.config contents:

    <?xml version="1.0"?>
    <configuration>
    	<configSections>
      <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
       <section name="AttendTracker.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
      </sectionGroup>
      <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
       <section name="AttendTracker.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </sectionGroup>
     </configSections>
    	<connectionStrings>
      <add name="AttendTracker.My.MySettings.WA_MMTP_TrackerConnectionString"
       connectionString="Data Source=MICHAEL-Laptop2\SQLEXPRESS;Initial Catalog=WA_MMTP_Tracker;Integrated Security=True"
       providerName="System.Data.SqlClient" />
      <add name="AttendTracker.My.MySettings.CurriculumConnectionString"
       connectionString="Data Source=MICHAEL-LAPTOP2\SQLEXPRESS;Initial Catalog=Curriculum;Integrated Security=True"
       providerName="System.Data.SqlClient" />
      <add name="AttendTracker.My.MySettings.Independence_822_APGConnectionString"
       connectionString="Data Source=MICHAEL-LAPTOP2\SQLEXPRESS;Initial Catalog=Independence_822_APG;Integrated Security=True"
       providerName="System.Data.SqlClient" />
     </connectionStrings>
    	<system.diagnostics>
    		<sources>
    			<!-- This section defines the logging configuration for My.Application.Log -->
    			<source name="DefaultSource" switchName="DefaultSwitch">
    				<listeners>
    					<add name="FileLog"/>
    					<!-- Uncomment the below section to write to the Application Event Log -->
    					<!--<add name="EventLog"/>-->
    				</listeners>
    			</source>
    		</sources>
    		<switches>
    			<add name="DefaultSwitch" value="Information"/>
    		</switches>
    		<sharedListeners>
    			<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
    			<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
    			<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
    		</sharedListeners>
    	</system.diagnostics>
    	<startup><supportedRuntime version="v2.0.50727"/></startup>
     <userSettings>
      <AttendTracker.My.MySettings>
       <setting name="WA_MMTP_TrackerConnectionStringUserOverride" serializeAs="String">
        <value />
       </setting>
      </AttendTracker.My.MySettings>
     </userSettings>
     <applicationSettings>
      <AttendTracker.My.MySettings>
       <setting name="FLAG_DEBUG" serializeAs="String">
        <value>True</value>
       </setting>
      </AttendTracker.My.MySettings>
     </applicationSettings>
    </configuration>
    

    Why am I getting this error. It is getting on my last nerve.

    Thanks for any help.

    Tuesday, August 27, 2013 11:55 AM

Answers

  • Hi Mike,

    Since it suddenly cannot work, have you tried

    "Delete old configuration files from c:\Users\username\AppData\Local\appname and c:\Users\username\AppData\Roaming\appname and then try to restart your application."?

    It seems this may related to your problem. If not, please feel free to let me know.

    Regards,


    Barry Wang
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, August 28, 2013 11:50 AM