Where are my Azure Temp Files?

I have a raygun error on an Azure Web App that baffles me.

d:\local\Temporary ASP.NET Files\root\8c572dab\d52156ac\
App_Web_636035960914530576dbc451921d-d5ba-4ab9-ae23-
3aebe17a2fcd.cshtml.ae8ccf29.453z6dsh.0.cs(151): 
error CS1528: Expected ; or = (cannot specify constructor arguments in declaration)

The error itself makes sense -- it's just a generated razor file that has a syntax error. It's the location of the generated file that baffles me.

This webapp is running a single instance. When I go to kudu for the app and browse around, though, I can't find that path. Instead, I see:

D:\local\Temporary ASP.NET Files\root>ls
6260ae3c

Is there something fundamental about Azure that I'm missing? If this web app were able to scale out to multiple instances, I'd understand that I was maybe hitting the wrong instance with kudu. With there being only a single instance, though, I really don't get it.


The location of temporary files for Azure Web Apps seems to always be D:\local\Temp. However, the entire D:\local folder is MOUNTED on different places for each web app by Azure.

This means that each web app will see a different D:\local, which is perhaps not too surprising. However, the real trick is that KUDU is by itself running as a separate process and gets its own private D:\local. So you are actually browsing KUDU's private D:\local and not that of your application.

Someone must have realized this can be a problem in debugging scenarios, so there is way to avoid this: add an app setting with name "WEBSITE_DISABLE_SCM_SEPARATION" and value "true" to your application through the Azure portal.

After the application has restarted then when using KUDU you should be able to see the same D:\local (including temporary files) as your application sees.

You should probably turn off this setting when you are done, as the default separation could be there for a reason.


Just found a (official) source, and further clarification, to the WEBSITE_DISABLE_SCM_SEPARATION(unsupported!) flag mentioned in Ole Tolshave's answer.

Kudu wiki page: Understanding the Azure App Service file system

Another important note is that the Main site and the scm site do not share temp files. So if you write some files there from your site, you will not see them from Kudu Console (and vice versa). You can make them use the same temp space if you disable separation (via WEBSITE_DISABLE_SCM_SEPARATION). But note that this is a legacy flag, and its use is not recommended/supported.