开发者

Can I change the temp folder path?

开发者 https://www.devze.com 2022-12-25 04:27 出处:网络
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:\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消