Upload randomly fails

Advertisement

gutauckis
Joined:
Posts:
3

Upload randomly fails

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:
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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Upload randomly fails

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.

Reply with quote

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
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

Reply with quote

martin
Site Admin
martin avatar

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.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum