When I have a specific setting in web.config, say the session state configuration, and I want to programmatically determine the configuration at Application_Start, how would I go about this. I am trying to have a slightly different configuration per environment.
- I do not want to overwrite the real web.config (prevent restarts)
- I know the solution presented in Use XML includes or config references in app.config to include other config files' settings, but I don't want the whole system.web section in a separate file, and system.web does not implement a file attribute like appSettings and connectionStrings do.
Any ideas?