In the past many applications have stored Temporary files in the Temp/Tmp directory; either the System's or the user specific ones. Recently though we've had many users in Enterprises where usage of the Temp directories are blocked due to Virus Scanning tools or Host Intrusion Prevention Tools and policies not allowing usage of those locations. I think the fear here is that multiple applications can read and write from that location and so a rogue application could negatively affect another application or its temporarily stored data. This seems like a correct and more secure way to function, so I cannot ask that people begin allowing an increased risk.
My question then is How/Where to (physically) securely store User Specific, Application Specific, yet temporary files.
Should each application be expected to manage this themselves, or is there some new Application & User Sandboxed Temporary data store feature I am not aware of?
Specifically I am focused on using .NET 4.0+, C#, and Windows 7+, but the question should be applicable to other languages used on Windows as well.
Similar, but older and not specific enough threads
- C# Best Practices: Writing "temporary" files for download: Place in applicaion's environment folder or temp folder
- Virus scanners locking and deleting temporary files - best way to cope with them?
- Windows temp directory details (Java)
- https://stackoverflow.com/questions/30547113/secure-temp-file-creation-within-temp-directory
The 1 answer of Encrypting the contents and file name does not seem like a Best Practice solution, and will still be blocked by the Host Intrusion Prevention System.