FTP get

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

Hi, I'm trying to FTP to a Unix server on my network (by the name of
"silc") to get a file. I am successfully able to do this from a DOS
window, but when I attempt to do it from my C# app (attempting to get
the same file), I get a 550 error from the server, which apparently
means that the file wasn't found or "no access".

I tried this:
WebClient request = new WebClient();
request.Credentials = new NetworkCredentials("myUserNameOnSilc",
"myPassword");
Uri uri = new Uri("ftp://silc/devl/users/jvogelma/notes");
request.DownloadData(uri);

The code gets an exception on the last line indicating the 550 error.
Is my syntax correct? Any thoughts?

Thanks.
Julie
 
Hi Julie,

you might want to open the connection/stream first.

Check the example in the online help for details.

Cheers,
Udo


=== original message ===
from: Julie
date: 2011-05-20 00:41
 
Back
Top