I am using Microsoft.Extensions.Configuration.ConfigurationBuilder to access my json configuration file. While the get works fine I wonder is it possible to use it to modify file values?
Asked
Active
Viewed 224 times
0
-
1[documentation says No](https://learn.microsoft.com/en-us/aspnet/core/api/microsoft.extensions.configuration.configurationbuilder) – stuartd Mar 14 '17 at 15:21
-
at the end, did you find my answer useful? – Vladislav Oct 16 '18 at 21:19
1 Answers
0
I don't think this is possible.
What you want is against the configuration principles. The purpose of configuration is to one-way-control the application without the need to modify the code.
If you want to modify a value in configuration then this is not a "configuration value". You should have such values stored in a different way e.g. as user personalization settings, or something similar (depends on your case)

Vladislav
- 2,772
- 1
- 23
- 42
-
But the possibility of modifying the config exist with the classic xml config http://stackoverflow.com/questions/11149556/app-config-change-value I think that it is not supported with json config – AnotherGeek Mar 14 '17 at 15:19