I have a problem in accessing "sqlServerCatalogNameOverwrites" section in app.config file.
Expand|Select|Wrap|Line Numbers
- <configuration>
- <configSections>
- <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
- </configSections>
- <sqlServerCatalogNameOverwrites>
- <add key="ISDev17" value="ISDev18" />
- </sqlServerCatalogNameOverwrites>
- </configuration>
I've tried
Expand|Select|Wrap|Line Numbers
- ConfigurationManager.GetSection("sqlServerCatalogNameOverwrites")
I've also tried
Expand|Select|Wrap|Line Numbers
- Configuration config = ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel.None);
- ConfigurationSection section = config.GetSection("sqlServerCatalogNameOverwrites");
I should implement "ConfigurationSection", "ConfigurationElement", "ConfigurationProperty" and point to my own type in config file.
Problem is i can't change type, section type must be System.Configuration.NameValueSectionHandler.
Is any way to change the configuration?
Any help is appreciated.