Oqtane Notes: Understanding Site Settings vs. App Settings for Hosting Models and Render Modes

https://www.jocheojeda.com/2025/10/07/oqtane-notes-understanding-site-settings-vs-app-settings-for-hosting-models-and-render-modes/

After countless Oqtane installs, I finally learned how its configuration really works. The values in appsettings.json only apply when creating a new site — once it’s running, all runtime and render mode changes must be made from the admin panel. This post explains that subtle but important difference.

#Oqtane, #Blazor, #Wasm, #Server, #appsettings, #SiteSettings, #ShaunWalker

Today's tip that I should start this mini-series with🎯.

The last two days it was about using different providers instead of the default one. But using (or I should write adding) different provider does not mean ditching the old one. We can add many of them and settings will be merged together. The order is important though. We will get different setting value if we register them in different order (assuming they all have it defined).

The last registered provider's value will win. See the following example 👇

Docs 📑: https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers

#dotnet #appsettings #providers

Configuration providers - .NET

Discover how to configure .NET apps using the configuration provider API and the available configuration providers.

Today's tip will be helpful if you need to avoid relying on external sources for configuration.

Files are good for storing the values for production needs but are not the best if we need to read those in our integration tests.
External dependency in best scenario will be slow and in worst one it could lead to errors ❌ in tests that would not be problems in the logic that we test.

In such scenario Memory provider is useful. We can initialize it with a collection of KeyValuePair-s and we are good to go ✅.

See the attached example 👇.

Docs: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#key-per-file-configuration-provider

#dotnet #configuration #appsettings

Configuration in ASP.NET Core

Learn how to use the Configuration API to configure AppSettings in an ASP.NET Core app.

appsettings.json is a standard file that holds application configuration but it's not the only one. There are multiple providers and one of them allows to have configuration per file?

To enable it use builder.Configuration.AddKeyPerFile(Directory.GetCurrentDirectory()); and make sure the files names are the same as your configuration sections. If needed replace ':' with double '_'.

See the attached example 👇.

Docs: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#key-per-file-configuration-provider

#dotnet #configuration #appsettings

Configuration in ASP.NET Core

Learn how to use the Configuration API to configure AppSettings in an ASP.NET Core app.

Strongly typed configuration in .NET - the AppSettings class

I write about programming, software development, and architecture.

A good #QualityOfLife #tip I have on here is going to #AppSettings, then #CollapsedToots and checking the boxes for Media, Replies, Lengthy, and Notifications.

It makes browsing your #Home and #Local #TimeLines so much easier.