I suggest you first use FileZilla of some other windows FTP client to connect to your AS400 server. This will confirm that it is working OK. After that, connect using something like the following C# code:
FTPConnection cxn= new FTPConnection();
cxn.ServerAddress = "myas400server.mydomain.com";
cxn.UserName = "myusername";
cxn.Password = "mypassword";
cxn.Connect();
cxn.DownloadFile("C:\mydirectory\localfilename", "remotefilename");
cxn.Close();
or the following VB.NET code:
Dim cxn AS new FTPConnection()
cxn.ServerAddress = "myas400server.mydomain.com"
cxn.UserName = "myusername"
cxn.Password = "mypassword"
cxn.Connect()
cxn.DownloadFile("C:\mydirectory\localfilename", "remotefilename")
cxn.Close()
- Hans (EDT)