User secrets (in Development) These are merged in order — later values override earlier ones. 🧱 2. What are configuration providers?
Short answer: Configuration providers are components that load configuration data from various sources.
Explain a bit more
Built-in Providers: JSON files (appsettings.json) Environment variables Command-line arguments In-memory collections Azure Key Vault User Secrets (for local dev) Custom providers (you can build your own) builder.Configuration .AddJsonFile("appsettings.json") .AddEnvironmentVariables() .AddCommandLine(args); Each provider plugs into the same configuration system, so you can access everything via IConfiguration. Configuration providers are components that load configuration data from various sources. Built-in Providers: JSON files (appsettings.json) Environment variables Command-line arguments In-memory collections Azure Key Vault User Secrets (for local dev) Custom providers (you can build your own)
Example code
builder.Configuration .AddJsonFile("appsettings.json") .AddEnvironmentVariables() .AddCommandLine(args); Each provider plugs into the same configuration system, so you can access everything via IConfiguration. Configuration providers are components that load configuration data from various sources. Built-in Providers: JSON files (appsettings.json) Environment variables Command-line arguments In-memory collections Azure Key Vault User Secrets (for local dev) Custom providers (you can build your own) Example: builder.Configuration .AddJsonFile("appsettings.json") .AddEnvironmentVariables() .AddCommandLine(args); Each provider plugs into the same configuration system, so you can access everything via IConfiguration. Configuration providers are components that load configuration data from various sources. Built-in Providers: JSON files (appsettings.json) Environment variables Command-line arguments In-memory collections Azure Key Vault User Secrets (for local dev) Custom providers (you can build your own) Example: builder.Configuration .AddJsonFile("appsettings.json") .AddEnvironmentVariables() .AddCommandLine(args); Each provider plugs into the same configuration system, so you can access everything via IConfiguration. 🔐 3. How do you manage secrets in development? In development, never store passwords, API keys, or connection strings in code or ppsettings.json. Use User Secrets — a safe way to store secrets outside the project tree. 🧰 4. What is User Secrets in ASP.NET Core? User Secrets are a local, developer-only configuration storage that keeps sensitive data out of source control. Setup: Enable secrets: dotnet user-secrets init
Real-world example (ShopNest)
ShopNest admin screens use MVC: controller loads data, Razor view renders HTML, Tag Helpers build forms safely.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png