visual J# downloading file from ftp issue

I am trying to download a file off of an ftp server using WebClient.Here is my code....
[code]WebClient request = new WebClient();
Uri newuri=new Uri("ftp://ftp.fedex.com/pubus/rates/downloads/documents2/Ground.txt");
String pathname="C:\Documents and Settings\2346298\My
Documents\Visual Studio 2005\Projects\ShippCalculator\ShippCalculator\Ground.txt";
request.DownloadFile(newuri,pathname);[/code]


When I compile and run I get an exception saying...
"System.Net.WebException: The underlying connection was closed: An unexpcted error occured on a recieve."

I am not sure how to fix this... I hope someone can help me out here

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories