Configure the .NET Core agent for Azure App Service

When using Azure App Service, you can configure the .NET Core agent with:

  • The Azure Portal: Configure the .NET Core agent using environment variables.

    Add all settings to the Application Settings section of the Configuration blade using environment variable syntax.

  • Environment variables in a web.config file: Place your overrides using the environment variable convention in the <environmentVariables> section of <aspNetCore> element.

  • A YAML configuration file: Upload the file to your Azure web application by including it in your application deployment or using the Kudu console.

    In the Configuration\Application Settings blade, add a new application setting called CONTRAST_CONFIG_PATH with a value that points to this file.

    For example, to use the contrast_security.yaml file in the root of your application, add a new application setting with the key CONTRAST_CONFIG_PATH and value of D:\Home\site\wwwroot\contrast_security.yaml in Configuration\Application Settings. Application files in Azure App Service are deployed to D:\home\site\wwwroot.

See also