Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: Timeout with VB.NET ftp.Get and ftp.List
mwalsh
mwalsh@rsilink.com

From: Coral Gables, FL USA
Posts: 3
Member Since: 11/06/03
posted November 6, 2003 5:44 PM

Hello,

I am trying to use ftp namespace in one of my vb.net scripts. It has no graphical interface. I can attach to my FTP site no problem, but each time I try to do a ftp.get or ftp.list I get the following exception

Message "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"

The windows sample application works fine which has the component.

Any help would be greatly appreciated.

Thank You,

Manus
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 6, 2003 8:23 PM

Without seeing your code I could not even make a guess. Please post a simple of example of something that doesn't work.

mwalsh
mwalsh@rsilink.com

From: Coral Gables, FL USA
Posts: 3
Member Since: 11/06/03
posted November 7, 2003 9:23 AM

Thanks for getting back to me. This is a vb.net function with a project reference to

   ' Create FTP connection object
   Dim ftp As New ftp
   Dim currentFolder As String
   With ftp
    .Server = channelAddr
    .Username = userName
    .Password = password
   End With
   ' This works fine
   Try
    currentFolder = ftp.GetDirectory()
   Catch ftpE As ProtocolException
    Exit Function
   End Try
   ' This caused the timeout
   Try
    ftp.FileType = FileType.Ascii
    Dim allFiles() As FtpFile
    allFiles = ftp.Get(folder, "*", inputFolder, False)
   Catch ftpE As ProtocolException
    ftp.Close()
   Catch e As Exception
 ftp.Close()
    Exit Function
   End Try
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 7, 2003 9:40 AM

Try setting Passive to false. Or if it's already false, make it true.
mwalsh
mwalsh@rsilink.com

From: Coral Gables, FL USA
Posts: 3
Member Since: 11/06/03
posted November 7, 2003 11:49 AM

Thanks Tony. It works fine now.

Manus
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX