Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in .NET FTP by
i've just started using this component, and i'm simply trying to test it out by downloading a file. this is the error i get:

Prohibited file name: C:\mypath\files\data_1.txt

here is the code causing the trouble:

FTPClient ftp = new FTPClient("ftp.myhost.com");
ftp.Login("username", "password");

ftp.ConnectMode = FTPConnectMode.PASV;
ftp.TransferType = FTPTransferType.ASCII;
ftp.Get("data_1.txt",Server.MapPath("files/")+"data_1.txt");
ftp.Quit();

i'm sure i'm missing something obvious, but if anyone could point it out, i would be very appreciative. thanks!

-lhb

1 Answer

0 votes
by (162k points)
The FTP server doesn't understand "C:\mypath\files\data_1.txt"

It is get(destination, source), not get(source, destination)

i've just started using this component, and i'm simply trying to test it out by downloading a file. this is the error i get:

Prohibited file name: C:\mypath\files\data_1.txt

Categories

...