Hi all, I use the WinSCP C# code to upload files to several FTP/SFTP servers each day. I am only having an issue with one server right now, where I get errors that files failed to upload, but when I look on the remote server I see them. It is not all file checks that throw the errors; the majority work fine. It is not the usual permissions issue that is documented on here, as we have had the
transferOptions.FilePermissions = null
and
transferOptions.PreserveTimestamp = false
in place for several years now.
If I call the
transferResult.Check()
for each upload, it will go into the Catch, and I get:
System Error. Code: 2.
The system cannot find the file specified | File or folder 'SomeFile.txt' does not exist.
System Error. Code: 2.
The system cannot find the file specified SessionRemoteException
I tried switching to
!transferResult.IsSuccess
, but I get the same issue, where it thinks the file failed to upload when it didn't.
I will mention that the remote FTP server was recently changed, either to a new server, or just had the address updated. Would there be any sort of setting on the new server that I could inform them about to alleviate these errors? I really hate to turn off upload validation, but it is causing concern on daily reports when there really is no issue.
Thanks,
Rob