ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z...@umich.edu
Subject configuration
Date Sun, 12 Nov 2006 21:37:46 GMT
I am using the following code to read the app.config file:

            string[] names = ConfigurationManager.AppSettings.AllKeys;
            NameValueCollection appStgs = ConfigurationManager.AppSettings;
            for (int i = 0; i < appStgs.Count; i++)
            {
               log.Debug(i+" Name: " + names[i] + " Value: "+
                 appStgs[i]);
            }

And got the following errors:

- System.Configuration.ConfigurationErrorsException: Configuration 
system failed to initialize ---> 
System.Configuration.ConfigurationErrorsException: Unrecognized 
configuration section sectionGroup. 
(C:\c#\Window_form\CodeMaker_ibatis\CodeMaker_ibatis\bin\Debug\CodeMaker_ibatis.exe.config
line 
8)
   at 
System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean 
ignoreLocal)
   at 
System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors

schemaErrors)
   at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String 
configKey)
   --- End of inner exception stack trace ---
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.get_AppSettings()
   at CodeMaker_ibatis.OpenDBDialogBox..ctor() in 
C:\c#\Window_form\CodeMaker_ibatis\CodeMaker_ibatis\OpenDBDialogBox.cs:line 
36

Any idea?

-Henry

Mime
View raw message