As FTP is tagged, which is quite an acceptable approach to the file transfer, all you need is to have FTP server on one of the hosts, and you can develop a client part of FTP transfer using the class
System.Net.FtpWebRequest
:
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[
^].
(Would you need to develop the server-side of FTP as well? I don't think you will need it, but you can find an appropriate pure .NET library on CodeProject and elsewhere. FTP is the application-level protocol over TCP, which is fully and natively implemented in .NET FCL, so this is not a problem, too.)[EDIT #1]
Probably you did not find how to copy a file, because you did not learn all the request types:
http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.aspx[
^].
To copy a file, you use either the method
DownloadFile
or the
UploadFile
.
Also, you should not forget that the FTP server can configure different access privileges for different users, so you have to take care about proper configuration.
[EDIT #2]
You can find the upload code sample here:
http://msdn.microsoft.com/en-us/library/ms229715.aspx[
^].
—SA