Home Forums .NET libraries Xceed SFTP/FTP for .NET Recieve Progress not reporting properly

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20809 |

    Hello,
    in the OnFileTransferStatus(object sender, FileTransferStatusEventArgs e)

    e.BytesPercent and e.AllBytesTotal is always 0 when receiving file.

    during a send, all works well…

    the only way to show progress is to first connect to the server, query for the file and its size then initiate the receive process then calculate the percentage from
    e.BytesTransferred .. this seem like a rather tedious job.. or am I missing something obvious?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Henok (had 4122 views)

    User (Old forums)
    Member
    Post count: 23064

    For the FileTransferStatusEventArgs to work properly, the server must provide the size of the file it is about to send in the reply it gives. When BytesPercent equals 0, it means that the server does not give this information, thus the component is not able to provide these parameters with meaningful values.

    And this is why it works when uploading files to the server, since the component knows the size of the files it sends.

    The workaround is to do as you wrote.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 279 views)

    User (Old forums)
    Member
    Post count: 23064

    how can i make the server provide the size? I have control over the sending server so i can change the configuration. It’s IIS 6.0 & another one is 5.0

    thank you,

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Henok (had 458 views)

    User (Old forums)
    Member
    Post count: 23064

    Any one out there know a solution besides the workaround?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Henok (had 388 views)

    User (Old forums)
    Member
    Post count: 23064

    Unfortunately, IIS is one of the few that does not return size, and it is not configurable, as far as we know.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 5191 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.