下面是使用示例。
传输方式最好用BINARY,如果用ASCII,会改变文件的编码格式。
ftp = new EnterpriseDT.Net.Ftp.FTPClient(ftpip, ftpport);
ftp.Login(ftpusername, ftppassword);
ftp.ConnectMode = EnterpriseDT.Net.Ftp.FTPConnectMode.ACTIVE;
ftp.TransferType = EnterpriseDT.Net.Ftp.FTPTransferType.BINARY;
ftp.Put(filename);
ftp.Quit();