Re: Command Line posts large files, .NET fails
Please post logs from both the script and the code.
winscp.com /command "open ftp://ftpuser:ftppwd@ftpserver -explicittls" "ascii" "call site sitecmd" "put localfile remotefile " "close" "exit"
SessionOptions SOt = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpSecure = FtpSecure.Explicit,
HostName = "ftpserver",
UserName = "ftpuser",
Password = "ftppwd",
Timeout = new TimeSpan(6, 0, 0)
}
SOt.AddRawSettings("SendBuf", "0");
using (WinSCP.Session Ses = new WinSCP.Session())
{
Ses.SessionLogPath = @"c:\temp\log.txt";
Ses.Open(SOt);
TransferOptions Trn = new TransferOptions();
Trn.TransferMode = TransferMode.Ascii;
Ses.ExecuteCommand(sitecmd);
TransferOperationResult TrnRes;
TrnRes = Ses.PutFiles(localfile, remotefile, false, Trn);
Trn.Check();
}