다음 코드를 사용하여 FTP에서 파일을 다운로드하고 있습니다. 처음 두 vaiables의C# WebClient FTP에서 파일 다운로드
NetworkCredential credential = new NetworkCredential(Properties.Settings.Default.FTPUserName, Properties.Settings.Default.FTPPassword);
string inputfilepath = Path.Combine(Properties.Settings.Default.LocalDownloadFolder, file);
string ftpfullpath = Properties.Settings.Default.FTPSite + Properties.Settings.Default.FTPFolder + file;
WebClient request1 = new WebClient();
request1.Credentials = credential;
request1.DownloadFile(ftpfullpath, inputfilepath);
값은 다음과 같습니다
The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
편집 : 내가 파일이 실제로 존재하는 것을 볼 수있다, 자격 증명
E:\FTPDownloads\CardholderManagementReport_1030_2012-12-11.xls
ftp://abc.com/AKSHAY/CardholderManagementReport_1030_2012-12-11.xls
이 오류로 표시 괜찮아 FileZilla를 사용하여 다운로드 할 수 있습니다.
그리고 무엇이 문제입니까? 오류 메시지를 이해하지 못합니까? –
이 답변이 도움이됩니까? http://stackoverflow.com/a/6098905/435693 – Morvader