Host unknow when connecting to ftp using FTP client library

+1 vote

hi, i need to connect to a folder of ftp server, let say ftp://127.0.0.1/testFtp/Files

this code throw exception host unknow:

Ftp client = new Ftp();
client.Connect("ftp://127.0.0.1/testFtp/Files");
client.Login("anonymous","");

what's wrong in my code? thanks.

asked Jun 9, 2017 by fdb (250 points)

1 Answer

0 votes

Don't specify "ftp://" protocol nor folder when connecting:

client.Connect("127.0.0.1"); 
client.Login("anonymous","");
client.ChangeFolder(@"Folder1/Folder2");
answered Jun 9, 2017 by Limilabs support (237,290 points)
...