1.2: Create Azure App Service web apps - Configure web app settings Flashcards
Describe how app settings are passed to application code
App settings are variables passed as environment variables to the app code.
For Linux and custom containers they’re passed using the –env flag
Describe how to navigate to app settings within the Azure portal
Application settings can be accessed by navigating to your app’s management page and selecting Configuration > Application Settings.
Describe app setting prescedence
Values in App Service override the ones in web.config or appsettings.json
Describe app setting storage storage security feature
App settings are always encrypted when stored (encrypted-at-rest).
Describe how to add a new App Setting
To add a new app setting, click New application setting. If you are using deployment slots you can specify if your setting is swappable or not. In the dialog, you can stick the setting to the current slot.
Describe the special requirement for nested App Setting key names
In default or custom Linux container nested key names need to replace : with __
Describe how to edit App Settings in bulk
You can edit settings in bulk using the ‘Advanced’ option.
It opens up an editor showing all settings in a JSON format.
Descirbe how to configure connection string
For ASP.NET and ASP.NET Core developers, the values you set in App Service override the ones in Web.config. For other language stacks, it’s better to use app settings instead, because connection strings require special formatting in the variable keys in order to access the values.
Describe General settings > Stack settings
Stack settings: The software stack to run the app, including the language and SDK versions.
For Linux apps and custom container apps, you can also set an optional start-up command or file.
Describe General settings > Platform settings
Platform settings: Lets you configure settings for the hosting platform, including:
- Bitness: 32-bit or 64-bit.
- WebSocket protocol: For ASP.NET SignalR or socket.io, for example.
- Always On: Keep the app loaded even when there’s no traffic. By default, Always On isn’t enabled and the app is unloaded after 20 minutes without any incoming requests. It’s required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.
- Managed pipeline version: The IIS pipeline mode. Set it to Classic if you have a legacy app that requires an older version of IIS.
- HTTP version: Set to 2.0 to enable support for HTTPS/2 protocol.
- ARR affinity: In a multi-instance deployment, ensure that the client is routed to the same instance for the life of the session. You can set this option to Off for stateless applications.
Describe General settings > Debugging
Debugging: Enable remote debugging for ASP.NET, ASP.NET Core, or Node.js apps. This option turns off automatically after 48 hours.
Describe General settings > Incoming client certificates
Incoming client certificates: require client certificates in mutual authentication. TLS mutual authentication is used to restrict access to your app by enabling different types of authentication for it.
Describe the differences between Configuration > Path mappings for Windows and Linux OS
Windows: you can customize the IIS handler mappings and virtual applications and directories.
Linux and containerised apps: You can add custom storage.
Describe how to customise Windows handler mappings
Handler mappings let you add custom script processors to handle requests for specific file extensions. To add a custom handler, select New handler. Configure the handler as follows:
Extension: The file extension you want to handle, such as .php or handler.fcgi.
Script processor: The absolute path of the script processor. Requests to files that match the file extension are processed by the script processor. Use the path D:\home\site\wwwroot to refer to your app’s root directory.
Arguments: Optional command-line arguments for the script processor.
Describe how to configure Windows virtual applications and directories
You can configure virtual applications and directories by specifying each virtual directory and its corresponding physical path relative to the website root (D:\home). To mark a virtual directory as a web application, clear the Directory check box.
Describe how to configre custom storage for Linux and containerised apps
- Name: The display name.
- Configuration options: Basic or Advanced.
- Storage accounts: The storage account with the container you want.
- Storage type: Azure Blobs or Azure Files. Windows container apps only support Azure Files.
- Storage container: For basic configuration, the container you want.
- Share name: For advanced configuration, the file share name.
- Access key: For advanced configuration, the access key.
- Mount path: The absolute path in your container to mount the custom storage.