How to disable preloadEnabled on an Azure App Service

I wrote this article here that describes the requirements for creating an XDT file which will allow the configuration of attributes that must happen in the applicationHost.config file.  As you know, you cannot simply / directly make a change to that file (applicationHost.config) on the Azure App Service, you have to extend it via this XDT concept.

Follow those instructions at this location “Making changes to the applicationHost.config on Azure App Service” here, however instead of configuration shown in Listing 1, use the following:

<?xml version="1.0"?>
  <configuration xmlns:xdt="">
     <site name="%XDT_SITENAME%" xdt:Locator="Match(name)">
      <application xdt:Transform="SetAttributes(preloadEnabled)" preloadEnabled="false">

Place the XDT file into the D:\home\site directory and restart the App Service.

After the effective configuration is created via WAS, you can dump it out using this command in KUDU, which I discuss here.

type c:\dwasfiles\sites\#1standard\config\applicationHost.config > myAppHostConfig.config

*NOTE: replace #1standard with the name of your App Service

Then you can dump out the contents of the file using this command in KUDU.

type D:\local\config\applicationHost.config > myAppHostConfig.config

Then confirm the configuration has been applied to the configuration.

‘*NOTE: although it is possible to make this configuration to any of the attributes in the applicationHost.config file, it does not mean they will all be honored.  Some attributes, although they can be changed, will not become effective.