+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.

by (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");
by (301k points)
...