title: Azure App Service Application Settings not overriding appsettings.json values
body: <p>I have a React SPA with .Net Core WebAPI backend being deployed to Azure App Service.  When developing locally i use a appsettings.json file to configure the WebAPI backend.   I am setting a key/value pair for an external api called &quot;XyzApi&quot;.</p>
  <pre><code>{
    &quot;XyzApi&quot;: &quot;https://somedomain/api&quot;
  }
  </code></pre>
  <p>In a WebAPI controller I access this config setting using the Configuration provider.</p>
  <pre><code>var xyzApiUrl = Configuration[&quot;XyzApi&quot;]
  </code></pre>
  <p>This works fine.</p>
  <p>When I deploy the app to the App Service I need to change the the value of &quot;XyzApi&quot; to override the value from the appsettings.json with a new value.  I have added a key/value pair named &quot;XyzApi&quot; in the App Service Application Settings section in Azure.</p>
  <p>In the App Service documentation for Application Settings it says the value will be exposed to the configuration as an Environment Variable with the name &quot;APPSETTING_XyzApi&quot;.  It also says that it is supposed to override the value from the appsettings.json file for the key &quot;XyzApi&quot;.</p>
  <p>When the app spins up.  The issue is that the value for &quot;XyzApi&quot; is still set to the value from the appsettings.json file.  It is NOT being overridden.  And as expected there is now a new key/value pair for &quot;APPSETTING_XyzApi&quot;.</p>
  <p>Why is the Azure App Service not overriding the key/value pair from the appsettings.json file with the new value configured in the Azure AppService Application Settings.</p>
  <p>Here is the code that configures the Configuration provider.</p>
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          CreateHostBuilder(args).Build().Run();
      }
  
      public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
          Host.CreateDefaultBuilder(args)
              .ConfigureWebHostDefaults(webBuilder =&gt;
              {
                  webBuilder.UseStartup&lt;Startup&gt;();
              })
              .ConfigureAppConfiguration((hostingContext, config) =&gt;
              {
                  var env = hostingContext.HostingEnvironment;
  
                  config.AddJsonFile(&quot;appsettings.json&quot;, optional: true, reloadOnChange: true)
                      .AddJsonFile($&quot;appsettings.{env.EnvironmentName}.json&quot;,
                          optional: true, reloadOnChange: true)
                      .AddEnvironmentVariables(); 
              });
  }
  </code></pre>