Changing Temporary Files Folder

By Akbar

One of my client was having problems with the small space on the C drive on a server machine which was hosting a application. There were few errors in the server error about “No enough space”.Though I would say that in ideal situation it would be best to increase the space on the C: drive as most of the other Operating System related applications also reply on the free space on C: drive, when there is no other easy way of increasing the space on C: drive, administrator can relocate the temporary files folder created by

Please note that create a compile version of the site and stores it in its default temporary folder. This is usually %Windows Install Folder%Microsoft.NETFrameworkv2.0.50727Temporary ASP.NET Files (For ASP.Net 2.0)This folder can grow very fast in case web server has large sites hosted on that server. Fortunately, provides a simple way to change this location. This is stored in the web.config file and can defined in the Global web.config (placed at %Windows Install Folder%Microsoft.NETFrameworkv2.0.50727CONFIG). To change this path add the new full folder path in the Compilation section of the configuration file. Here is a sample of how this looks like (this must be under System.Web section):

<compilation tempDirectory=“E:ASP.Net Temporary Folder” debug=false“>

One can find the documentation of all different sections of configuration file at:

In case when Internet is not available, or you just need a quick reference, there is also a small helpful file in the configuration folder. This file is named “web.config.comments” and is in the CONFIG folder of the framework folder.