Archived Forum Post

Index of archived forum posts


[ftp2] Events in UWP

Aug 31 '17 at 07:42

Hello. I'm using ftp2 component and i'm trying to manage ftp events in a UWP Windows Phone application.

I need to get the percentage of completion of a SyncRemoteTreeAsync operation, or alternatively, the percentage/progress of PutFileAsync.

This is my ftp setup:

ftp.Hostname = "";
ftp.Username = "#####"
ftp.Password = "#####";
ftp.KeepSessionLog = true;
ftp.VerboseLogging = true;
ftp.AutoGetSizeForProgress = true;

Here's the event handlers:

ftp.ProgressInfo += Ftp_ProgressInfo;
ftp.PercentDone += Ftp_PercentDone;
ftp.BeginUploadFile += Ftp_BeginUploadFile;

When i call one of this methods:

result = await ftp.PutFileAsync(localFile.Path, localFiles.Name);


result = await ftp.SyncRemoteTreeAsync(storageFolder.Path, mode);

no one of this events are fired:

private void Ftp_ProgressInfo(object sender, ProgressInfoEventArgs eventArgs)
private void Ftp_BeginUploadFile(object sender, FtpTreeEventArgs args)
private void Ftp_PercentDone(object sender, PercentDoneEventArgs eventArgs)

what am I doing wrong? Thanks. Giancarlo.


from where localFiles.Name is assigned