Hi,
I am attaching here the session log.
It is the entire log generated while I was trying to upload a 74 KB file.
There seems to be a "Network error: Software caused connection abort".
The log I generate inside my code does not capture an error.
These are some lines from the log I generate:
2019-03-28 12:20:12.668 | Connect to WinSCP.
2019-03-28 12:20:16.944 | Try upload all files in Outbox folder...
2019-03-28 12:20:37.732 | ...Done
2019-03-28 12:20:37.741 | Uploaded Files: 1, Files Failed: 0
And this is the relevant code that produces the above 4 lines of log.
// Connect
Add2Log("Connect to WinSCP.");
session.Open(sessionOptions);
// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Automatic;
transferOptions.PreserveTimestamp = false;
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
TransferOperationResult transferResult;
Add2Log("Try upload all files in Outbox folder...");
transferResult = session.PutFiles(
outboxFolder + "*"
, remoteFolder
, false
, transferOptions
);
// Throw on any error
transferResult.Check();
Add2Log("...Done");
Add2Log(string.Format(
"Uploaded Files: {0}, Files Failed: {1}"
, transferResult.Transfers.Count
, transferResult.Failures.Count
));
Thanks