Post a reply

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)


Topic review



My question is that why I'm getting this error and how to resolve this issue

Re: Error Exception :Error deleting file 'myFiles'. After resumable file upload

What is your question?
Do you or do you not have the permissions to delete the file?
Are you asking how to disable the resumable transfer? Or are you asking why do you get the error?

Error Exception :Error deleting file 'myFiles'. After resumable file upload

While uploading file using winscp .net library following error occurred


Error Exception :Error deleting file 'myFiles'. After resumable file upload the existing destination file must be deleted. If you do not have permissions to delete file destination file, you need to disable resumable file transfers.
General failure (server should provide error description).
Error code: 4
Error message from server: Failure

Bellow is my code

using (Session session = new Session())
    Console.WriteLine("Connection Successful...");
    RemoteDirectoryInfo directoryInfo = session.ListDirectory("/");
    // Upload files
    TransferOptions transferOptions = new TransferOptions();
    transferOptions.TransferMode = TransferMode.Binary;
    TransferOperationResult transferResult;
    if (File.Exists(stFileName))
        transferResult = session.PutFiles(stFileName, RemoteFolderPath, false, transferOptions);
        // Throw on any error
        // Print results
        foreach (TransferEventArgs transfer in transferResult.Transfers)
            Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
        Console.WriteLine("File not found : " + stFileName);