Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: dont download file with progresbar

What "install error"? What exact error are you getting? Post full exception stacktrace.
AndrewVas

dont download file with progresbar

I used this WinSCP library in WPF to download files from the FTP server. Everything worked until I decided to add an installation with a progress bar:
void SessionFileTransferProgress(Object sender , FileTransferProgressEventArgs e)
{
    MessageBox.Show(e.FileName);
}

It was giving an install error!

Without this, everything works, but I still need to add the progres bar update.

The size of the files folder is very huge!

My code:
using (Session session = new Session())
{
    // Will continuously report progress of transfer
   // session.FileTransferProgress += SessionFileTransferProgress;
 
    // Connect
    session.Open(sessionOptions);
 
    try
    {
        // Download files and throw on any error
        session.GetFiles(url, path);
    }
    finally
    {
        // Terminate line after the last file (if any)
        MessageBox.Show("Download stop");
    }
}

Version WinSCP: 5.19.3