Settings
In App Services, app settings are environment variables which are injected into your app on startup. Editing app settings in any way will trigger an app restart. Deployed app settings override any defaults that are set in the appsettings.json file. This allows you to easily use different environment settings in development and deployment.
App Service settings:
- are encrypted at rest
- can only have names which contain alphanumeric, period and underscores
- can be accessed in portal by navigating to
Environment variables > Application settings - can be edited in bulk in a JSON format via
Advanced editin portal - can be verified after deployment via
https://<app-name>.scm.azurewebsites.net/Env - can be "stuck" to a particular deployment slot, if desired
You can also configure appsettings from the azure cli:
az webapp config appsettings set --resource-group <group-name> --name <app-name> --settings key1=value1 key2=value2
Connection strings
Similar to standard app settings, connection strings can be configured for your app. For .NET stacks, connection strings set up in Azure portal override properties in the <connectionStrings> group in Web.config.
In general, it is better for non .NET stacks to use standard app settings for connection strings because of formatting requirements; however, some Azure databases are only backed up alongside your app if they are configured explicitly as connection strings.
You can bulk also bulk edit connection strings like you can app settings:
[
{
"name": "name-1",
"value": "conn-string-1",
"type": "SQLServer",
"slotSetting": false
},
{
"name": "name-2",
"value": "conn-string-2",
"type": "PostgreSQL",
"slotSetting": false
},
...
]
At runtime, connection strings are available by name, prefixed with a representation of the type:
- SQLServer:
SQLCONNSTR_ - MySQL:
MYSQLCONNSTR_ - SQLAzure:
SQLAZURECONNSTR_ - Custom:
CUSTOMCONNSTR_ - PostgreSQL:
POSTGRESQLCONNSTR_ - Notification Hub:
NOTIFICATIONHUBCONNSTR_ - Service Bus:
SERVICEBUSCONNSTR_ - Event Hub:
EVENTHUBCONNSTR_ - Document DB:
DOCDBCONNSTR_ - Redis Cache:
REDISCACHECONNSTR_
For example SQLCONNSTR_name-1 for the first item in the bulk edit example above.
General settings
In Configuration > General setings, you can configure some generic settings for your app:
Stack settings- Language
- SDK version
- Startup command
Platform settings- Bitness (64/32)
windows only - FTP (FTPS only or disabled)
- HTTP version (2.0 or 1.1)
- HTTPS only
- Sockets (SignalR or socket.io)
- Always on
- ARR affinity
- Min TLS version
- Bitness (64/32)
- Remote debugging
- Certificates