.NET GetTempFileName throws System.IO.IOException: The file exists
Getting an exception System.IO.IOException: The file exists when calling GetTempFileName? I had this problem with a legacy app, despite the call working fine on nearly all of our systems. It turns out the temp directory had been filling with temp files and eventually went bang. From the MSDN:
- The GetTempFileName method will raise an IOException if it is used to create more than 65535 files without deleting previous temporary files.
- The GetTempFileName method will raise an IOException if no unique temporary file name is available. To resolve this error, delete all unneeded temporary files.

1 Comments:
At April 6, 2009 7:21 PM ,
PHenry said...
Thank you Paul for your blog! You helped me out so much I blogged about it!
http://www.pchenry.com/Home/tabid/36/EntryID/125/Default.aspx
Post a Comment
<< Home