Change .NET configuration at runtime without modifying app.config

555 views Asked by At

I need to change a .NET app's configuration at runtime (to be precise, at startup).

The app doesn't have write access to the place where the app.config (or web.config) is saved.

The configuration section I need to add is third-party (by Oracle), so I cannot just change the way the configuration works.

Also, I don't have a custom ConfigurationSectionHandler, because the config section is by Oracle, and apparently they don't provide a config section handler class to read from the section.

Is that possible?

1

There are 1 answers

0
T.S. On

Yes, this is possible. Web.config can include sections from other config files. You add them as sections in your web.config. Changing web.config causing web app to restart but changing those children files doesn't. Opening a non web.config file as a configuration object