Thanks Jakob, I have changed my code.
I still get an exception sometimes though on code example 1. I now get this exception:
Data connection already open; Transfer starting.
On this code:
Dim items() As FTPFile
Try
items = ftp.DirDetails(url.AbsolutePath.Substring(1))
Catch ex As Exception
'Retry
items = ftp.DirDetails(url.AbsolutePath.Substring(1))
End Try
This is the log:
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.038 : 220 net3-nl-iis-35 Microsoft FTP Service (Version 5.0).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.038 : ---> USER mediamaker.nl
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.138 : 331 Password required for mediamaker.nl.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.138 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.238 : 230 User mediamaker.nl logged in.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.238 : ---> TYPE I
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.338 : 200 Type set to I.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.338 : ---> SYST
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.439 : 215 Windows_NT version 5.0
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.449 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.549 : 227 Entering Passive Mode (213,19,161,142,10,221).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.659 : ---> LIST
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.679 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.759 : 125 Data connection already open; Transfer starting.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:00.859 : 226 Transfer complete.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.523 : 227 Entering Passive Mode (213,19,161,142,10,222).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.533 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.533 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.533 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.623 : 227 Entering Passive Mode (213,19,161,142,10,226).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.723 : 227 Entering Passive Mode (213,19,161,142,10,227).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.853 : ---> LIST
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 11 okt 2005 18:33:03.964 : 125 Data connection already open; Transfer starting.
Can someone please help? Am I doing something wrong or is this a bug?
Thanks in advance very much.
Kind regards,
David van Leerdam