I was working with Acapela (Text to Speech) ActiveX control. My webservice is using this control to synthesize speech. The problem on production suddenly came with an error message.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
I was thinking about the issue why temp file is not created and it wrongly says ‘The file exists’.
In actual machine’s Temp folder (c:\windows\temp) contains a large number of temp files. The GetTempFileName method will raise an IOException if it is used to create more than 65535 files without deleting previous temporary files. Each voice generation call by web service generates two temp files without deleting them. So there is no temp file sweep policy defined and this problem occurred when quota exceeded.
The GetTempFileName method will raise an IOException if no unique temporary file name is available. To resolve this error, delete all unnecessary temporary files.
Luckily it was not end user product, otherwise we have to provide the fixes to clients. I just fixed it on production server.