Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.4k views
in .NET FTP by (160 points)
Hello guys,
I have next a trouble using EnterpriseDT Ftp for .NET.

In my VB.NET aplication I use FTPClient object to download big sized video files.
Something like this

                        
                        Dim files() As String = ftp.Dir()
                        For Each fl As String In files
                            If fl.EndsWith(".wmv") Then
                                ftp.Get(path + "\" + fl, fl)
                            End If
                        Next


The problem is that if file is very big (im my case approximately > 300MB), process hangs and do not return from ftp.Get() function
without any message. If file have less size, foreach continuos to the next


Same problem is with ftp.Put(). It never returns if file have very big size. In both cases files are downloading and uploading in full size.

:(

3 Answers

0 votes
by (51.6k points)
Firstly, I recommend using FTPConnection in preference to FTPClient. It provides a much better user-interface as well as adding some features.

The data-channel is probably dropping out on you. Make sure the Timeout property is not zero. In FTPConnection it defaults to 2 minutes (120,000ms). You should then find that you get a SocketException 2 minutes after it's dropped out. After that you can enable transfer resumption (by calling ResumeTransfer()) and then call DownloadFile() again. You may like to drop the timeout to something smaller - 30,000ms perhaps.

- Hans (EnterpriseDT)
0 votes
by (51.6k points)
By the way, edtFTPnet/Express and edtFTPnet/PRO both have an auto-retry feature in which what I described above all takes place automatically. In other words, when you call UploadFile a failure will automatically be detected followed by an attempt to reconnect and resume the transfer. From the developer's perspective it's all transparent and therefore simply results in greater reliability.

- Hans (EnterpriseDT)
0 votes
by (160 points)
OK,
Thank you for advice.

Categories

...