Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
13.6k views
in .NET FTP by (280 points)
Hello

I am trying to use the edtftpnet-1.2.2.dll with C#. When I run the Login() method in a Desktop application everything works properly, but the same code, with the same Server, Password, Port and User, in an Asp.Net Application, always says that the host didn't respond. Am I missing any configuration? It seems to me that some permission under IIS is blocking me.

Thanks in advance for your help.

Artur

17 Answers

0 votes
by (340 points)
OK, Here is the log after setting AutoPasiveIPSubstitution = true;

DEBUG [t] 8 Jun 2006 08:05:18.921 : Looking for trial license
DEBUG [t] 8 Jun 2006 08:05:18.921 : Trial key='170-2052-4108-1124', owner='trialuser', product='edtftpnetpro'
INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 8 Jun 2006 08:05:18.921 : Licence expiry date: 7/12/2006
INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 8 Jun 2006 08:05:18.921 : Trial license
DEBUG [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 8 Jun 2006 08:05:18.921 : Connecting to ftp.aaoamerica.org:21
DEBUG [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 8 Jun 2006 08:05:18.953 : ftp.aaoamerica.org resolved to 67.94.102.162
DEBUG [n] 8 Jun 2006 08:05:18.968 : Connecting directly to ftp-server 67.94.102.162:21
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:19.171 : 220- FTPshell Server Service (Version 3)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:19.171 : 220
DEBUG [n] 8 Jun 2006 08:05:19.171 : Created control-socket: ImplicitFTPS=False, SocksContext=, RemoteHost=67.94.102.162, controlPort=21, timeout=0, CompatibilityFlags=0
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:19.171 : ---> AUTH TLS
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:19.250 : 234 AUTH command accepted. Setting up SSL/TLS connection
DEBUG [n] 8 Jun 2006 08:05:19.250 : Beginning d handshake.
DEBUG [n] 8 Jun 2006 08:05:19.968 : d handshake complete.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:19.968 : ---> PBSZ 0
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.062 : 200 PBSZ Command accepted. Protection buffer set to 0
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.062 : ---> PROT P
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.140 : 200 PROT Command accepted
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.140 : ---> USER TLC
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.218 : 331 User name okay, need password
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.218 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.296 : 230- Welcome To AAOA's FTP Server
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.296 : 230 User logged in, proceed
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.296 : ---> TYPE I
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.375 : 200 Command okay
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.375 : ---> CWD process
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.468 : 250 Path changed to "/process"
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.468 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.562 : 227 Entering Passive Mode (10,31,4,52,39,18)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 8 Jun 2006 08:05:20.578 : Substituting server supplied IP (10.31.4.52) with remote host IP (67.94.102.162)
DEBUG [n] 8 Jun 2006 08:05:20.578 : Connecting directly to ftp-server 67.94.102.162:10002
ERROR [n] 8 Jun 2006 08:05:38.109 : Failed to create connecting socket : 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
System.Net.Sockets.SocketException: 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
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at c9.a(EndPoint A_0)
at ad.b(EndPoint A_0)
at n.a(BaseSocket A_0, IPAddress A_1, Int32 A_2)
at n.a(String A_0, Int32 A_1)
0 votes
by (162k points)
The IP addresses are the same which is a good start.

It is possible that there is a firewall problem preventing you connecting to the host on that port. If you have access to the server logs, it would be helpful to inspect them.

The strange thing about this server is that in non-secure mode, PASV returns the same IP as the resolved hostname. But in secure mode, it is different. If you are able to talk to the people running the server that might help - there could be a configuration problem.
0 votes
by (280 points)
And do you have any clue why I can't access the FTP through and Web Application?

As I told you, the message I receive is:

"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"

I couldn't use this log issue either, probably because it is not available in the version I am using (1.2.2)
0 votes
by (162k points)
Have a look at the help to see how to enable logging - or the sample code.
0 votes
by (280 points)
Hello

I learned how to enable loggin in edtftpnet 1.2.2, and here is my problem:

This first log is the one I got when I run my code in a Windows Application - the one which creates a .exe file.

INFO [FTPTeste.Form1] 12 jun 2006 12:28:23.212 : Connecting
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 12 jun 2006 12:28:23.619 : Connecting to 200.152.8.58:20
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.744 : 220 Bem Vindo ao TsukiAnimes!
INFO [FTPTeste.Form1] 12 jun 2006 12:28:23.744 : Logging in
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.744 : ---> USER artur
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.806 : 331 User name received, need password.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.806 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.869 : 230 User logged in, proceed.
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:23.869 : Setting up passive, ASCII transfers
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.869 : ---> TYPE A
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.900 : 200 Type set to A.
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:23.900 : Directory before put:
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:23.916 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:24.150 : 227 Entering Passive Mode (200,152,8,58,8,0).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.197 : ---> LIST .
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.244 : 125 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.478 : 226 Closing data connection.
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 12 jun 2006 12:28:27.478 : Found 5 listing lines
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : total 3770
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : drwxrwxrwx   1 root     root          512 Jun 07 17:10 Videos
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : drwxrwxrwx   1 root     root          512 May 25 16:14 ragnarok
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : drwxrwxrwx   1 root     root          512 Apr 18 15:23 Mp3
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : -rw-rw-rw-   1 root     root      3860384 Feb 03  2005 FMA_saver.exe
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.478 : Directory after delete
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.478 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.541 : 227 Entering Passive Mode (200,152,8,58,8,0).
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.713 : ---> LIST
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.760 : 125 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.900 : 226 Closing data connection.
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 12 jun 2006 12:28:27.900 : Found 5 listing lines
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : total 3770
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : drwxrwxrwx   1 root     root          512 Jun 07 17:10 Videos
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : drwxrwxrwx   1 root     root          512 May 25 16:14 ragnarok
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : drwxrwxrwx   1 root     root          512 Apr 18 15:23 Mp3
DEBUG [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : -rw-rw-rw-   1 root     root      3860384 Feb 03  2005 FMA_saver.exe
INFO [FTPTeste.Form1] 12 jun 2006 12:28:27.900 : Quitting client
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.900 : ---> QUIT
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 12 jun 2006 12:28:27.947 : 221 Goodbye.
INFO [FTPTeste.Form1] 12 jun 2006 12:28:27.947 : Test complete


Everything worked properly. Now, with the same code, the Log file I got with the Web Application
INFO [TsukiAnimes.FTPTeste] 12 jun 2006 12:38:44.460 : Connecting
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 12 jun 2006 12:38:44.601 : Connecting to 200.152.8.58:20
DEBUG [TsukiAnimes.FTPTeste] 12 jun 2006 12:39:05.727 : Uma tentativa de conex
0 votes
by (280 points)
Nenhuma id
0 votes
by (51.6k points)
It looks like you have no network connectivity to 200.152.8.58. The problem must be broader than just edtFTPnet since the failure occurs before any actual FTP protocol communication takes place. So if you were to try to simply open a plain socket connection to port 20 on 200.152.8.58, you should find that that also fails. I don't know why you have having network connectivity problems.

Sorry I couldn't be of more help.

- Hans (EDT)

Categories

...