private void FTPUpload()
{
string userName = "User";
string password = "****";
string uploadUrl = "ftp://(FTP Address):Port/test.txt";
if (!System.IO.File.Exists(@"C:\Temp.txt"))
return;
// 要上傳的檔案
StreamReader sourceStream = new StreamReader(@"C:\Temp.txt");
byte[] data = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
sourceStream.Close();
WebClient wc = new WebClient();
wc.Credentials = new NetworkCredential(userName, password);
try
{
wc.UploadData(uploadUrl, data);
}
catch (Exception ex)
{}
}
Reference Web:
MSDN:如何透過 FTP 上傳檔案
CODE-FTP上傳檔案的精簡寫法
C# 上傳文件至FTP
Asp.net - C# 從ftp上傳檔案~* (對此FTP命令而言,要求的URI無效問題)
Filezilla Server供外連的設定及C# FTP上傳實作
C# 上傳檔至遠端伺服器(適用于桌面程式及web程式)
C# FTP 上傳
2016年12月10日 星期六
2016年12月9日 星期五
FileZilla Server無法啟動:Could not load TLS libraries
更新Windows Patch:
https://support.microsoft.com/en-us/kb/2533623
官網上的連結有些已無法使用,要自行再google
例如:
Windows 7 32bit
官網上是
Update for Windows 7 (KB2533623)

但點開後無法下載。
找關鍵字 Windows 7 (KB2533623) 就有新下載頁可用
https://www.microsoft.com/zh-tw/download/details.aspx?id=26767
訂閱:
文章 (Atom)