Connect to FTP Server with .net 2.0 [closed]

2019-06-24 04:55发布

问题:

I'm looking to connect to an existing FTP server, upload a file, wait while the server generates a report on it, and download that report back to the local machine in a VB.NET 2.0 WinForms project.

Is there an existing FTP library that would be helpful to me for this? My task seems simple enough that I'd rather not get into the world of active vs. passive, sockets, etc.

回答1:

System.Net.FtpWebRequest and System.Net.WebClient can both do this.

WebClient is simpler but supports less features. I haven't run into many situations that FtpWebRequest can't handle.



回答2:

Look into System.Net.FtpWebRequest/FtpWebResonse



回答3:

You need to use FtpWebRequest.



回答4:

Have you tried the FtpWebRequest class

  • http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx