FTPS Protocol ...

Started by mhall, April 06, 2014, 12:28:27 AM

Previous topic - Next topic

mhall

Hi All,

I'm working with the iFTP functions for the first time and trying to upload to a site of mine hosted on Yahoo. I'm able to get a connection to the internet using iBegin() but my iHostConnect() call is returning and error code of 12111 - connection aborted.

iGetResponse() is returning:

Quote
220-Welcome to the Yahoo! Web Hosting FTP server
220-Need help? Get all details at:
220-http://help.yahoo.com/help/us/webhosting/gftp/
220-
220-No anonymous logins accepted.
220-Yahoo!
220-Local time is now 23:23. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 5 minutes of inactivity.


I've double checked my login information to confirm it's correctness.

I'm guessing the error has to do with the fact that Yahoo requires the FTPS protocol. Is that something which is supported by iHostConnect()?

I've tried both @FTPPASSIVE as in the docs and @FTP with no luck.

Thanks for any pointers!

~Micheal

P.S. - I searched the forums and Tech Database for FTPS but didn't come up with anything. :)

Deana

The WinBatch Extenders: Winsock and WinInet do not currently support SFTP. However WinSCP ( http://winscp.net/eng/docs/introduction ) is an open source freeware SFTP client for Windows using SSH. Its main function is safe copying of files between a local and a remote computer. It supports scripting and command-line interface.

Using dotNet with WinSCP: http://winscp.net/eng/docs/guide_dotnet

I put together a WinBatch dotNet code sample that uses WinSCP to handle SFTP.

REQUIRES WinBatch 2013A or newer

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/dotNet/Third~Party~Components/WinScp+SFTP~using~WinSCP~dotNet~.txt
Deana F.
Technical Support
Wilson WindowWare Inc.

mhall

Hi Deana,

As always, thanks for the pointers. However, SFTP and FTPS look to be two different protocols, and Yahoo specifically mentions FTPS, at least with my hosting package.

According to this article* from 2007 dotNet has built in support for FTPS via FtpWebRequest class ... But that's. As much as I know about that ... Does that mean it could be called directly from Winbatch code, without the need for a third party tool like the one you mentioned? I've never worked with dotNet before via Winbatch or otherwise.

Thanks,
Micheal

* http://www.codeguru.com/csharp/.net/net_general/internet/article.php/c14329/FTPS-vs-SFTP-What-to-Choose.htm

Deana

WinSCP seems to support both. The code sample I posted is for SFTP however it could probably be modified to handle FTPS. reference: http://winscp.net/eng/docs/library.

I have never worked with the FtpWebRequest class however it does seem to support FTP over SSL, Specifically the property EnableSsl: http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest_properties%28v=vs.110%29.aspx

A good place to start with dotNet in WinBatch is the help file topic dotNet and the tech database dotNet section: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/dotNet

If you are familiar with COM automation in WinBatch the jump to dotNet should be fairly easy.
Deana F.
Technical Support
Wilson WindowWare Inc.