4

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?

4
  • 2
    so the goal is to add a configuration or to be able to connect to a Oracle database ? Commented Aug 29, 2013 at 13:41
  • 1
    The goal is to add a configuration 'in-memory', without changing the actual app.config file. Commented Aug 29, 2013 at 14:16
  • Bastian I still dont see the point for this, if you know the values that your configuration section is going to have, just store them in your code, since editing "in-memory" but not storing them will be pointless Commented Aug 29, 2013 at 14:31
  • I see your point, but believe me, I have a valid reason for modifying the configuration at startup ("in-memory"). If necessary, I could explain the reasons, but I think that would be off-topic. Commented Aug 29, 2013 at 17:09

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.