Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should I generate temporary files for my application?

I've been warned by several people not to store temporary files in the Temporary Internet Files directory. Where would be the best place to store any temporary or log files that my application generates?

like image 558
Mark Carpenter Avatar asked Jun 25 '09 18:06

Mark Carpenter


2 Answers

You best bet is to use isolated storage for temp files, but you can also use GetTempFileName.

like image 184
JP Alioto Avatar answered Oct 04 '22 19:10

JP Alioto


Is there a reason you can't use the default temporary directory? Essentially use the name returned from Path.GetTempFileName?

like image 33
JaredPar Avatar answered Oct 04 '22 19:10

JaredPar