Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
829 views
in .NET FTP by (120 points)
Dim ftp As New FTPConnection
ftp.ServerAddress = "192.168.0.114"
ftp.UserName = ftp_username
ftp.Password = ftp_password

Dim files As FTPFile() = ftp.GetFileInfos()
On this line I ge the below error,
"Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

But when I use "Dim files As String() = ftp.GetFiles()" which returned the file list correctly.

Can any one help me please

1 Answer

0 votes
by (51.1k points)

This is probably a firewall problem.  A new connection is opened for each directory listing and file transfer, so if the new connection is blocked then you get a timeout.  Please have a look here.

by (120 points)
Hi, Thanks for your reply.
I added the ftp.ConnectMode = FTPConnectMode.PASV before and after of ftp.Connect() statment, but still got the following error.

"Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."


Here is my full code.
------------------------------------------------
Dim ftp As New FTPConnection
ftp.ServerAddress = "192.168.0.114"
ftp.UserName = ftp_username
ftp.Password = ftp_password
ftp.ConnectMode = FTPConnectMode.PASV
ftp.Connect()
Dim files As EnterpriseDT.Net.Ftp.FTPFile() = ftp.GetFileInfos()
by (51.1k points)
I'm sorry for the late reply.  I was away on holidays.  Have you resolved this issue?  If not, are you able to connect using FileZilla or another FTP application?
by (120 points)
Hi, I hope you have enjoyed your holidays.
Sorry, the issue is not resolved yet, and yes I am able to list out using FileZilla as well as WinSCP tool.
if the firewall is concerned, here my application will go to multiple clients and most of them are will be nontechnical in this firewall unblocking will not work.

Is there any other help I can get from you, that will be appreciated.
by (51.1k points)
Please set AutoPassiveIPSubstitution to true.
by (120 points)
I did that but still getting the same error
by (161k points)
Unfortunately this is getting beyond answering in a public forum. You'll need to lodge a support request at enterprisedt.com/help and have it dealt with in the usual way, which requires a support agreement.

Categories

...