troubleshooting Question

using C# to access an ftp server ?

Avatar of brgdotnet
brgdotnetFlag for United States of America asked on
C#
11 Comments1 Solution2248 ViewsLast Modified:
I am trying to open an ftp connection using C# to read all files off of the ftp server.
I have logged in manually from dos using ftp so my credentials are correct. When the
last line of code below is executed, I get this error message:

"The requested URI is invalid for this FTP command"

Is there an expert who can help me with this?

// C# code below

WebClient request = new WebClient();

request.Credentials = new NetworkCredential("us","klop");

Stream myStream = new request.OpenRead("ftp://10.333.12.333");
ASKER CERTIFIED SOLUTION
Carnou

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros