Thursday, April 10, 2008

Moving the Temporary ASP.NET folder to another location

If you like me you like to move things around. Usually I believe I have a good reason though ;)

My good laptop has a nice, fast SSD (32 GB) inside it and a nice, big HDD (160 GB). The way flash drives like these work is that writing is usually slower than reading and according to the critics if you continuously write then its best not done on a flash drive. Therefore I decided my compiler should rather write to a standard HDD than the SSD. To make that happen I realized I needed to move my Temporary ASP.NET folder off the main disk where Windows is installed. Here is how that's done:

Find your machine.config file - usually under one of the .NET directories under C:\Windows\Microsoft.NET\

Open this file and add a <compilation> tag to it with an attribute called "tempDirectory" like so:

<compilation tempDirectory="d:\tempASP" />

Just ensure that you map the tempDirectory attribute to your own path.

No comments: