Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

ugaciaka

I solved by myself. Sysadmin change the permission to the group, the user didn't have read permission!
ugaciaka

Cannot turning off ResumeSupport, trouble downloading files

Hi,

I need help about this topic.

Since the system administrator change permissions of remote directory I tried to solve the following
Cannot open remote file 'myfile.exe'.

Permission denied.
Error code: 3
Error message from server: Permission denied

I change the code as:
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;

This isn't working yet!

My code of GetFiles is the following
var transferResult =
    session.GetFiles(SftpPath, $"{UploadToLocalPath}\\", RemoveRemoteFiles, transferOptions);
 
if (!transferResult.IsSuccess)
{
    _getFilesOutput.ExceptionMessages = transferResult.Failures.Select(e => e.Message).ToList();
    _getFilesOutput.IsFailed = true;
}
 
_getFilesOutput.DownloadedLocalFiles.Clear();
 
(_getFilesOutput.DownloadedLocalFiles as List<string>)?.AddRange(transferResult.Transfers
    .Select(p => p.FileName).ToList());

Some suggestions?

Thanks