Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.2k views
in .NET FTP by (200 points)
Hello,
does anyone have a code sample of cancel transfer method?
The help file comments that this method generally called from a separate thread but when i call the cancel transfer method the application not respond.

Thanks.

9 Answers

0 votes
by (162k points)
Can you post the log file that is produced?

Normally a separate thread would be needed to cancel the transfer as the current thread will be blocking during the transfer

Hello,
does anyone have a code sample of cancel transfer method?
The help file comments that this method generally called from a separate thread but when i call the cancel transfer method the application not respond.

Thanks.
0 votes
by (200 points)
This is the log produced:

INFO [modmain] 4 ene 2005 16:47:43.535 : Connecting
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 4 ene 2005 16:47:53.358 : Connecting to 195.269.120.21:21
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.143 : 220 ProFTPD 1.2.8 Server (ProFTPD) [linux3]
INFO [modmain] 4 ene 2005 16:47:57.143 : Logging in
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.143 : ---> USER alison
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.404 : 331 Password required for alison.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.404 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.694 : 230 User alison logged in.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.694 : ---> TYPE I
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.995 : 200 Type set to I
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:57.995 : ---> CWD httpdocs
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.255 : 250 CWD command successful.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.255 : ---> CWD descargas
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.515 : 250 CWD command successful.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.515 : ---> CWD 23
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.766 : 250 CWD command successful.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:58.766 : ---> SIZE instalar_7.2.51-20050103.exe
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:59.036 : 213 84725113
INFO [modmain] 4 ene 2005 16:47:59.036 : Before get
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:59.046 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:59.296 : 227 Entering Passive Mode (195,219,130,21,235,82).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:59.547 : ---> RETR instalar_7.2.51-20050103.exe
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 4 ene 2005 16:47:59.797 : 150 Opening BINARY mode data connection for instalar_7.2.51-20050103.exe (84725113 bytes)
INFO [modmain] 4 ene 2005 16:48:14.317 : Before abort
INFO [modmain] 4 ene 2005 16:48:14.317 : After abort
El subproceso '<Sin nombre>' (0x720) termin
0 votes
by (162k points)
It could be a threading problem, i.e. the main thread is downloading, therefore the cancel gets blocked as it is also in the main thread.

This is the log produced:

Do you have an example or any ideas?
Thanks!
0 votes
by (200 points)
But i call CancelTransfer method in a different thread that the main thread.

Code:

Private cancelarT As Thread
cancelarT = New Thread(New ThreadStart(AddressOf modmain.Cancelar))
cancelarT.Start()

Private Sub Cancelar()
ftp.CancelTransfer()
End Sub

Doesn't exists any example of this?

Thanks
0 votes
by (162k points)
We'll put a test case together for the next release.

But i call CancelTransfer method in a different thread that the main thread.

Code:

Private cancelarT As Thread
cancelarT = New Thread(New ThreadStart(AddressOf modmain.Cancelar))
cancelarT.Start()

Private Sub Cancelar()
ftp.CancelTransfer()
End Sub

Doesn't exists any example of this?

Thanks
0 votes
by
I have the same problem. Is there a solution ready?
0 votes
by (162k points)
We've identified a problem with cancelling which it looks like we have resolved. We hope to release a new version in the next few days.

I have the same problem. Is there a solution ready?
0 votes
by (140 points)
Hello,

I need a solution, too. Where can I download the fixed version?
You just have 1.1.9 on your page.

Best regards,
Rainer
0 votes
by (162k points)
We've made a fix but not released just yet - if you would like to test the fix for us, please send an email to support at enterprisedt dot com

Hello,

I need a solution, too. Where can I download the fixed version?
You just have 1.1.9 on your page.

Best regards,
Rainer

Categories

...