Topic "Upload randomly fails"

Author Message
gutauckis
[View user's profile]

Joined: 2016-12-06
Posts: 3
When uploading a large amount of files, it randomly fails. Once in a while it even completes successfully.
Using .NET, the version of the WinSCPNet is 1.3.6.7136.
Im using the following code:
Code:
With mySessionOptions
      .Protocol = Protocol.Ftp
      .HostName = "vaultcracker2"
      .UserName = "XXXXX"
      .Password = "XXXXXXXXX"
   End With
   Using mySession As Session = New Session
      Dim transferOptions As New TransferOptions
      transferOptions.TransferMode = TransferMode.Automatic
      transferOptions.SpeedLimit = 2500
      transferOptions.ResumeSupport.State = TransferResumeSupportState.Smart


      ' Connect
      mySession.Open(mySessionOptions)

      'Create Remote folder
      If (mySession.FileExists(szRemoteFolder) = False) Then
         mySession.CreateDirectory(szRemoteFolder)
      End If

      ' Upload files
      transferResult = mySession.PutFiles(szSavedFolder, szRemoteFolder, False, transferOptions)
      ' Throw on any error
      transferResult.Check()
      For Each transfer In transferResult.Transfers
         Console.WriteLine("Upload of {0} succeeded", transfer.FileName)
      Next
   End Using


The message I get back is: Error transferring file 'c:\a\xxxx.txt', Copying files to remote side failed.
When I look at the server log all I see is: FAILED UPLOAD

No other information is given as to WHY it failed.
Advertisements
gutauckis
[View user's profile]

Joined: 2016-12-06
Posts: 3
One other thing, is if I use FileZilla I don't have any issues uploading.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26706
Location: Prague, Czechia
Please attach a full session log file showing the problem.

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Guest




Log attached. While you are looking at it I have found that I have another issue;
I am trying to set the folder permissions on upload and its not working.
Here is the code
Code:
Dim myFilePermissions As New FilePermissions
                myFilePermissions.Octal = "755"

                Dim transferOptions As New TransferOptions
                transferOptions.TransferMode = TransferMode.Automatic
                transferOptions.ResumeSupport.State = TransferResumeSupportState.Smart
                transferOptions.FilePermissions = myFilePermissions

Interestingly enough when I FTP with the same user with Filezilla I am able to change folder permissions so I don't think its a umask issue as mentioned in another post.
log.txt (134.18 KB) Private file

Description: Session Log

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26706
Location: Prague, Czechia
Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
_________________
Martin Prikryl
gutauckis
[View user's profile]

Joined: 2016-12-06
Posts: 3
Not seeing the email. Whats your email address? I will look for it that way.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26706
Location: Prague, Czechia
My email address is in my forum profile.

Please, please sure your email address in your profile is correct.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License