Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: quit command not working on titan ftp server
marti100

From: Bern, Switzerland
Posts: 9
Member Since: 10/28/03
posted November 3, 2003 11:51 AM

I use

ftp1.Invoke(Dart.PowerTCP.SecureFtp.FtpCommand.Quit);

to quit from the titan ftp server.

Unfortunately it will not close the connection. This is from the titan server's log file:

3-11-03 17:44:09 [2/668] Sending: 226 Closing data connection. Transferred 498 bytes.
2003-11-03 17:44:10 [2/668] Received: QUIT
2003-11-03 17:44:10 [2/668] Sending: 221 Session Ended. Downloaded 0KB, Uploaded 0KB. Goodbye anonymous from 127.0.0.1.

When i do it manually from the dos command prompt then it will write to the log:

2003-11-03 17:37:17 [2/652] Received: QUIT
2003-11-03 17:37:17 [2/652] Sending: 221 Session Ended. Downloaded 0KB, Uploaded 0KB. Goodbye anonymous from 127.0.0.1.
2003-11-03 17:37:17 [2/652] Closing connection 0x1469008, socket #652

So with the titan ftp server i will have a lot of open connections!!! Has anybody an idea of what I'm doing wrong or how I could close them? Thanks

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 3, 2003 12:04 PM

Unless you can point me to a public server that has the same problem, all I can do is offer a workaround. That would be to call Ftp.Abort after the Quit completes. That would force us to close the connection.

If you can find a server for me, I could probably figure out what's going on pretty quickly.
marti100

From: Bern, Switzerland
Posts: 9
Member Since: 10/28/03
posted November 3, 2003 4:45 PM

Please go to 212.41.66.253 as user anonymous. This is a titan ftp server.

thanks
Tony Priest



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

There's no respone from that machine. Please try the following code and tell me if you get the error box:

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Try
      Dim Ftp1 As New Dart.PowerTCP.Ftp.Ftp()
      Ftp1.Server = "212.41.66.253"
      Ftp1.Username = "anonymous"
      Ftp1.Password = "whatever"
      Dim ivk As Dart.PowerTCP.Ftp.Invoke = Ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.PrintDir)
      MsgBox(ivk.Response.ToString)
      Ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Quit)
      If Ftp1.Connected Then
        MsgBox("ERROR: Still connected")
      End If
    Catch ex As Exception
      MsgBox(ex.Message)
    End Try

  End Sub
marti100

From: Bern, Switzerland
Posts: 9
Member Since: 10/28/03
posted November 4, 2003 3:32 AM

Sorry, it is 80.238.215.6 with user anonymous. This one works!

I have tried your program. I only changed that it can be started as a command line tool and that it writes to the dos prompt.

The output is:

C:\tmp\ftp\bin>ftp
257 "/" is current directory.

then it does not return to the command line, or in other words, it hangs ....

I suppose that i is a bug in the dart component. Is it possible to correct his? We have to use the Titan ftp server!!!
Tony Priest



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

The server is not closing the connection like it should be. You won't be able to Invoke Quit in the normal way with this server. You have to choices.

1) Kill the connection immediately using Ftp1.Abort

2) Invoke quit like this:

Ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null, "QUIT")
      
then close using abort.
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX