Can I change the temp folder path?
I have an as开发者_JS百科p.net app that uses System.IO.Path.GetTempFileName()
for temporary files. In the production IIS environment (W2K3), the temp folder (System.IO.Path.GetTempPath()
) points to C:\Windows\Temp
. But on my XP dev machine it's C:\documents and settings\machinename\ASPNET\temp
.
Is it possible to change this folder without affecting other accounts on my machine?
I speak for the XP.
You can change the temp on your asp.net account only and affect only the asp.net.
The easy dirty way, open regedit, locate on HKEY_USERS the asp.net acount, buy navigate the tree, and look on environment, for the TEMP, TMP that have the aspnet/temp, and just change them, and reboot. Attention with regedit.
The other way is to log as aspnet, and change them from controlpanel | system | advanced | enviroment variables.
That way you change the temp directory affecting only the aspnet acount.
精彩评论