Question : FTP Error - timeout when attempting to connect to site/port for GetFileList function

VB.NET 2005 Professional
clsFTP for FTP connectivity

I am using clsFTP which I found several years ago on the EE site.

I have several clients that have need for FTP functionality.  Until now, I have had no problems with connecting and performing various functions.  This new site which I must be able to manipulate is extremely slow...as opposed to any others.  I have verified that I have no problems with logging into the site, but my next step is to get a listing of the files at the root of the ftp site.  I receive an error associated with the connectivity timing out on me.

The code below is what's used to create a socket & connect specifically for getting a file list, uploading or downloading files:

        s = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
        ep = New IPEndPoint(Dns.Resolve(ipAddress).AddressList(0), port)  ' This one works for all other FTP sites.

        Try
            s.Connect(ep)
        Catch ex As Exception
            Throw New IOException(ex.Message)
        End Try

If I were able to increase a timeout parameter, I could live with that.  At the same time, I would really like to get to the bottom as to why it is so slow to begin with.  I spoke with a tech support person who is quite knowledgeable about their ftp functionality, but has no idea where to start with this one.

The error is:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 12.34.56.78:12345"

At a different time I would be more open to changing from the current FTP software, if necessary, but time is of the essence for me to resolve this problem.

I appreciate any 'qualified' efforts someone can provide me.

Sincerely,
Phil Tate

Answer : FTP Error - timeout when attempting to connect to site/port for GetFileList function

Yes, you can do this:

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
  if(!anchors[i].href.match('www.example.com/'))
    {anchors[i].target = "_blank";}
  if(!anchors[i].href.match('www.example1.com/'))
    {anchors[i].target = "_blank";}
  if(!anchors[i].href.match('www.example2.com/'))
    {anchors[i].target = "_blank";}
  if(!anchors[i].href.match('www.example3.com/'))
    {anchors[i].target = "_blank";}
        }
}
window.onload = externalLinks;


or

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
  if(!anchors[i].href.search('www.example') > -1)
    {anchors[i].target = "_blank";}
        }
}
window.onload = externalLinks;


Random Solutions  
 
programming4us programming4us