Functions (1 / 54): You’re deploying an Azure Function written in C# script. It needs to connect to an Azure SQL database in production. Where should the connection string be stored for the deployed app?
Answer:
In production, secrets like connection strings must be stored securely, and Application Settings (under Configuration in the Azure Function's app settings) is the correct place. Azure automatically makes these values available as environment variables.
host.json: Defines global runtime settings (e.g., logging, timeouts). Not for secrets like connection strings.
function.json: only references configuration values from Application Settings; it does not define or store secrets.
local.settings.json: Can be used for connection string, but it's used for local development only. Ignored in deployment; never reaches Azure.