FtpWebRequest request = FtpWebRequest.Create(myUriWithFileName) as FtpWebRequest; request.Method = WebRequestMethods.Ftp.DownloadFile; request.Credentials = new NetworkCredential(username, password); // credentials as necessary... request.UsePassive = false;//or true as is necessary request.UseBinary = true; using (FtpWebResponse response = (FtpWebResponse)request.GetResponse()) using (Stream responseStream = response.GetResponseStream()) { StreamToFile(responseStream, @"c:\Temp\my file.whatever"); // StreamToFile is just a helper to write from one stream to another... }
StreamToFile
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)