If it sometimes works, and sometimes doesn't, you should look into the process that provides the FTP service, not your code, IMO.
I don't have any experience with uploading files, but I'm constantly running into the same kind of error when retrieving files from an FTP server (MS IIS in my case).
At first, I thought it was my code, when my colleague noticed the FTP server shut down his connection once in a while too. He was using IE to manually look up files.
Our system people were not able to come up with a solution, but we did notice that this strange behaviour occurred omre frequently when network traffic was at a peak.
So maybe you should toy around with a browser for a while and see what happens?
Cheers, MichaelD
|