To enhance performance, scalability and management, you should store all content on DXP Web Apps using BLOB storage (and/or SQL database). The Web App's local file system is meant for code only, and therefore normally does not have large amounts of disk space.
To improve stability and performance further, the underlying Web App is using local cache, which also has a limited size; see Azure App Service Local Cache overview (Microsoft). This limit is currently set to 900 MB.
The deployment engine for DXP verifies that the Web App is below this limit. If the limit is exceeded, it may affect the ability to swap a new slot into production, and the time it takes to warm up a new instance during scale outs, and the reliability of backups, to name a few examples.
This is not supported because it will not work reliably in DXP. See Restricting Environment Access for information about implementng IP restrictions in a supported way.
During DXP deployment to preproduction or production environments, the following error message may appear when the application starts:
error CS0006: Metadata file 'D:\local\Temporary ASP.NET Files\root\X\X.dll' could not be found.
The dll is most often App_Code.dll or App_global.asax.dll but it may be any top-level file.
Top-level files include the global.asax file and all files in the bin and App_Code folders.
If this error occurs, set the optimizeCompilations attribute of the compilation element in web.config to false.
For DXP Service, optimizeCompilations does not improve anything; you cannot update individual files without restarting an app service because the App Service Local Cache feature is enabled. Also, the deployment flow always deploys to an empty wwwroot in the slot that is in a stopped state, and after files are deployed, it starts up and warms up; that starts the compilation (for preproduction and production environments). See also: Understanding ASP.NET Dynamic Compilation.
Updated 9 months ago