C# – How to read custom configurations from appsettings.json

The appsettings.json file is a convenient way to store and retrieve your application’s configuration. You can add it to any project and then use the Microsoft.Extensions.Configuration library to work with it. Since appsettings.json is just a JSON file, you can add anything to it (as long as it’s valid JSON). Compared with working with the … Read more

How to modify app.config at runtime

When you try to modify the app.config at runtime, if you don’t do it right, you’ll run into a few problems: You’ll get the following exception: System.Configuration.ConfigurationErrorsException: The configuration is read only. The updated value isn’t persisted. When you re-open your program, the value you changed is still the old value. This article will show … Read more