Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

Temporary Internet Files folder is different from the TEMP folder. I agree about not using the Temporary Internet Files folder - it is meant for a different usage.

The TEMP folder should be used for files that can be blown away without fear of crash.

The TEMP folder, however, is no place for log files or configuration files or anything of importance. I would create my own folder under the user's profile preferably in the Application Data or Local Settings.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top