FTP get

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
 
N

Nessi

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top