1

Thanks to Martin Prikryl for three examples on page Upload file to FTP site using VB.NET But I keep getting "Catch e" errors about not logged on or can't connect to server on two different servers. I can FTP to these servers using PuttyFTP or FileZilla. In each case, the statement that passes the Server IP address and destination path/file shows an exception when the object is right-clicked.Notated screen cap while stepping thru Upload routine

Any help would be appreciated, please.

Geneous42
  • 13
  • 4

1 Answers1

0

If by "PuttyFTP" (which does not seem to exist) you mean psftp, then you are using SFTP protocol, not FTP protocol.

These two are completely different and incompatible protocols.

There's no native support for SFTP in .NET. You have to use a 3rd party library.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Yes, PuttyFTP is psftp "under the hood". Thank you. I was only using it as a cross-check, but what you wrote lets me know it was a bogus check. My exception issues when using your suggested VB code remain, however. Please click the "Notated screen cap..." in the original post to see the exception messages. Is there some sort of permissions that must be set in the server to allow this upload? – Geneous42 Nov 25 '17 at 09:16
  • I'm not sure I understand you. So are you sure you are connecting to FTP server? Can you successfully connect using any (standalone) FTP client? Show us its log file. – Martin Prikryl Nov 25 '17 at 15:16
  • I am able to access our private AWS server, which is an instance of Debian, using FileZilla. But now I see FileZilla is using SFTP. I just looked for VB SFTP examples and will try them. Thanks. PS: This is the (redacted) FileZilla log of a connect and transfer: Status: Disconnected from server Status: Connecting to ##.59.88.###... Status: Connected to ##.59.88.### Status: Starting upload of S:\OrangePi\Scripts_Cloud_1123\index.html Status: File transfer successful, transferred 2,140 bytes in 1 second Status: Disconnected from server – Geneous42 Nov 25 '17 at 22:06
  • OK, so I've answered your question in the end, right? Please, consider accepting my answer. – Martin Prikryl Nov 26 '17 at 07:29