Is it possible to configure the location of "Temporary ASP.NET Files" folder in IIS?

Solution 1:

You can change the default location on a per website/application basis by editing the Configuration section of the Web.config file.

<system.web>
  <compilation tempDirectory="D:\MyTempFiles" />
</system.web>

The application will re-compile and the files will be stored at this new location, after which you can safely remove the old folders. Note that the folder names will stay the same; e.g. if the old location was:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\9878g103\e67805p7

then the new one will be:

D:\MyTempFiles\root\9878g103\e67805p7