Upload 200KB files via WinSCP .NET assembly
sessionOptions.AddRawSettings("ResumeSupport", "2") sessionOptions.AddRawSettings("IgnorePermErrors", "1") sessionOptions.AddRawSettings("PreserveTime", "0")
Advertisement
sessionOptions.AddRawSettings("ResumeSupport", "2") sessionOptions.AddRawSettings("IgnorePermErrors", "1") sessionOptions.AddRawSettings("PreserveTime", "0")
Advertisement
With sessionOptions .Protocol = Protocol.Sftp .HostName = FTPAddr .UserName = FtpUserId .Password = FTPPassword .PortNumber = FTPPort .SshHostKeyFingerprint = sshHostKey .AddRawSettings("ResumeSupport", "2") .AddRawSettings("IgnorePermErrors", "1") .AddRawSettings("PreserveTime", "0") End With
It's not. Will be fixed in 5.2, as per the tracker entry above.Let me know, if this issue is fixed already with 5.1.3 version ?
Advertisement
Advertisement
SessionOptions sessionOptions = new SessionOptions() { Protocol = Protocol.Sftp, HostName = ConfigurationManager.AppSettings["sftp.host"], UserName = ConfigurationManager.AppSettings["sftp.userName"], Password = ConfigurationManager.AppSettings["sftp.password"], SshHostKeyFingerprint = ConfigurationManager.AppSettings["sftp.SshHostKeyFingerprint"], }; sessionOptions.AddRawSettings("ResumeSupport", "2"); sessionOptions.AddRawSettings("IgnorePermErrors", "1"); sessionOptions.AddRawSettings("PreserveTime", "0");
TransferOptions.ResumeSupport = TransferResumeSupport.Off
Dim sftp As New SessionOptions Dim session As New Session Dim transfer As New TransferOptions Dim result As TransferOperationResult With sftp .Protocol = Protocol.Sftp .HostName = "***" .UserName = "***" .Password = "***" .SshHostKeyFingerprint = "***" End With session.Open(sftp) transfer.ResumeSupport = TransferResumeSupport.Off [property is readonly] transfer.TransferMode = TransferMode.Binary result = session.PutFiles("C:\xx.csv", "xx.csv", False, transfer) result.Check()
Advertisement
transfer.ResumeSupport.State = TransferResumeSupportState.Off
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
Advertisement
You can post new topics in this forum