[Extension FtpWebRequest] Discussion

[Extension FtpWebRequest] Discussion

  
Forge Component
(5)
Published on 28 Jun by André Siébra
5 votes
Published on 28 Jun by André Siébra
Hi guys,

I have a question. Does this extension support SFTP ?
Hi Nelson

The source code of this extension is available publicly, and form the looks of it, it doesn't support any other protocol beside ftp://.

So the answer is No, it doesn't support SFTP.

Since Microsoft doesn't seem to provide an API built-in on the .NET framework for SSH/SFTP access, you may have to find a third party.

A quick search on the web turned out 2 opensource candidates that seem very easy to use:
Hope this helps.

Cheers

Miguel Simões João
Forgot to check the existent components .... there's already a SFTP extension out there:

http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=32

Cheers

Miguel Simões João
Hi Miguel,

thank you for your response. I'll go check it out.
Hello, I'm using the extesion and it works fine in one FTP server. But now I'm conecting to a different one, and doesn't list the files.
I did debug and it read the contents but doesn't split correctly to the output structure.
The code binary contains HTML so it doesn't pass the check (Unix or Windows line)

I assume I need to implement this, but my question is maybe you have done it already :D
Thank you!!!

public static AbstractDirLine getDirLine(string line)
{
if (UnixLine.matches(line))
{
return new UnixLine(line);
}
else if (WindowsLine.matches(line))
{
return new WindowsLine(line);
}
throw new ArgumentException();
}

This is how the HTML comes to the buffer

"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\r\n
<HTML>\r\n<HEAD>\r\n
<TITLE>FTP Listing of /pod at 194.55.63.20</TITLE>\r\n
<BASE HREF=\"ftp://111.22.22.11/pod/\">\r\n
</HEAD>\r\n<BODY>\r\n
<H2>FTP Listing of /pod</H2>\r\n
<HR>\r\n
<A HREF=\"../\">Parent Directory</A><BR>\r\n
<PRE>\r\n
Apr 18 2011 07:22         7174 <A HREF=\"04182656994.txt\">04182656994.txt</A>\r\n
Apr 18 2011 19:34        20531 <A HREF=\"04187046185.txt\">04187046185.txt</A>\r\n
</PRE>\r\n
<HR>\r\n
</BODY>\r\n
</HTML>\r\n"
OK HTML Response comes when I use Proxy and it is something tricky to parse. What I did to solve this issue is to bypass the proxy, so I don't need to use it anymore. (now I have a different IP) Works fine now.
Hi Carolina,

Thanks for sharing the workaround. As you may have guessed, I guess nobody had implemented the parsing of newlines in UNIX, sorry :)

Regards,

Paulo Tavares
Paulo Tavares wrote:
Hi Carolina,

Thanks for sharing the workaround. As you may have guessed, I guess nobody had implemented the parsing of newlines in UNIX, sorry :)

Regards,

Paulo Tavares
 
 
Hi everybody,

Can anybody get me this extension for OutSystems Agile Platform 5.0?
It would be very appreciated!
Thanks in advance!

Nuno Evangelho
Nuno Evangelho wrote:
 
 
Hi everybody,

Can anybody get me this extension for OutSystems Agile Platform 5.0?
It would be very appreciated!
Thanks in advance!

Nuno Evangelho
 
 I would apreciate that also.

Have you found any alternatives Nuno?

Thanks
Fábio Pedro
Hi everyone,

I'm trying to use this extension, but i getting an error

"The server returned an address in response to the PASV command that is different than the address to which the FTP connection was made."

I'm connecting to an redirect alias (ex:dyndns) through a port redirect ..... not helping

Can anyone show some light on how to get past this ?

Whilst I have never used this forge product, I would suggest from that error message that the following is happening;

PASV is - when the client (your forge product) uses the control connection to send a PASV command to the server and then receives a server IP address and server port number from the server, which the client then uses to open a data connection from an arbitrary client port to the server IP address and server port number received.

So in your example the ftp client is say connecting to "mytestbox.outsystems.com" 

The FTP server is most likely replying to the PASV command using the internal or another IP address that does not match the domain name "mytestbox.outsystems.com" and this is creating the error.

I am not sure who is strictly correct here but I would suggest you look at your FTP server settings and get it to respond using your dyndns server name (binding). If not then i suggest you using only IP addresses to connect and bind that IP to your FTP server but if you are using Dyndns then I would suggest the FTP server is hosted on a internet IP address that is dynamically assigned via an ISP.

Hope this helps.

Cheers, Mark