appsettings.json

noun

say it: “app-SET-ingz DOT JAY-sun” /æpˈsɛtɪŋz dɒt ˈdʒeɪsən/

An ASP.NET Core app's settings file, read at startup; secrets never go in it.

What does appsettings.json do?

appsettings.json holds the app's settings, such as logging levels and feature options. appsettings.Development.json overrides it locally. Never put secrets in it.

{
  "Logging": { "LogLevel": { "Default": "Information" } },
  "Recipes": { "PageSize": 20 }
}

In a sentence

  • “The database name lives in appsettings.json, and the password in user secrets.”

Level: Novice · More ASP.NET Core terms at this level

Updated