Henrie
asked on
idFTP won't connect anonymous
Just trying my first proggie in Delphi7.
Using idFTP to make an ftp client I am trying to connect to an ftp site as an anonymous user:
IDFtp1.Host := 'ftp.nai.com';
IDFtp1.Username:='anonymou s';
IDFTP1.Connect;
The connection is made from a system connected directly to the internet without a firewall, proxy, or whatsoever.
When connecting, after a few secs I get a (Delphi) message stating 'user anonymous@ftp.nai.com can not log in'
The same proggie connects fine on another system behind a proxy server. For that I have enabled the proxysettings of idFTP.
Any ideas what could I be doing wrong?
Using idFTP to make an ftp client I am trying to connect to an ftp site as an anonymous user:
IDFtp1.Host := 'ftp.nai.com';
IDFtp1.Username:='anonymou
IDFTP1.Connect;
The connection is made from a system connected directly to the internet without a firewall, proxy, or whatsoever.
When connecting, after a few secs I get a (Delphi) message stating 'user anonymous@ftp.nai.com can not log in'
The same proggie connects fine on another system behind a proxy server. For that I have enabled the proxysettings of idFTP.
Any ideas what could I be doing wrong?
ASKER
Thanks Alex, I already tried the same with an email password but forgot to mention it. It didn't work either. Bu the way ftp.nai.com accepts connecting without a password.
set up the Passive property to True
IDFtp1.Passive := True;
IDFtp1.Passive := True;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys! The next line of code was the fix to the problem:
IdFTP1.ProxySettings.Proxy Type := fpcmNone;
The ProxyType property was set (by myself) to 'fpcmUserSite' in the components' setting (not in code), because I was using a proxyserver when I started this project.
Erik, you get the points, your code indeed worked on a new form and new object so I knew it had to be my form and object settings.
Thanks again for helping a beginner ;-)
IdFTP1.ProxySettings.Proxy
The ProxyType property was set (by myself) to 'fpcmUserSite' in the components' setting (not in code), because I was using a proxyserver when I started this project.
Erik, you get the points, your code indeed worked on a new form and new object so I knew it had to be my form and object settings.
Thanks again for helping a beginner ;-)
Try setting the password to your email account...
I could be wrong, though. In that case, ignore my answer. :P