I am using the WinSCP .NET assembly to transfer a file via SFTP to an off-site server. My application creates an XML file locally, and then uses the WinSCP .NET assembly to perform the transfer. On some occasions (it has happened 3 of about 10 times), after the file is successfully transferred, the local source file is overwritten, and while it retains the XML schema, it has no records. The destination file remains correct.
The odd thing is that there is no code that manipulates the source file. Once the file has been transferred, the application code stops. Something else is overwriting this file, and I cannot figure out what it is. Any ideas?