This example illustrates the use of ProFTPClient in implicit FTPS mode with neither server nor client validation. This is not recommended usage since there is no way for either party to ensure the other party is who it claims to be, but it serves well to illustrate basic usage.
The example performs the following operations:
You can view the source-code here.
run host-name username password filenamewhere
INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:22.746 : Creating FTPS (implicit) client INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:22.986 : Turning off server validation INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:22.986 : Connecting to server localhost INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.517 : Logging in with username=test and password=test INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.527 : Setting up passive, ASCII transfers INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.537 : Directory before put: INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.617 : no files INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.617 : Putting YourFilename to server INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.687 : Directory after put: INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.747 : -rw-rw-rw- 1 user group 3409 May 11 15:46 ImplicitClient.exe INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.747 : Getting ImplicitClient.exe from server and saving as ImplicitClient.exe.copy INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.797 : Deleting ImplicitClient.exe INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.797 : Directory after delete: INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.837 : no files INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.837 : Quitting client INFO [EnterpriseDT.Net.Ftp.Pro.ProFTPClient] 25 Nov 2004 15:46:23.837 : Test completeThere should now also be a file called YourFilename.copy in the local directory.