Hi,
we run several instances of our program (c#) on a single computer. In each instance our code tries to create "many" temporary files with help of method Path.GetTempFile(). And sometimes, our program fails with exception:
Exception: Access to the path is denied.
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Path.GetTempFileName()
I checked temporary folder and didn't find something strange: free disk is enough, number of temporary files is not very big, etc.
I have only one explanation: one instance gets temporary file and opens it, but in the same time, another instance also gets name of the temporary file and tries to open it. If it is correct? If yes, how to solve the issue, if not how to understand what a problem?
UPD: failed on computer with Windows Server 2008 HPC
Thank you, Igor.