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: Executing FTP1.Abort causes application to hang.
pwroblewski

From: Austin, TX USA
Posts: 38
Member Since: 11/21/03
posted February 17, 2006 4:08 PM

I have an FTP application using the 2.3.2.0 version of the .Net Secure FTP DLL. The application will execute the FTP1.Abort if the FTP1.Close causes an exception, the FTP1.Abort will cause the application to simply hang, like it is waiting for some response, then we will simply click the task on the Task Bar and the FTP application will continue processing. Would you have any thoughts on why this would happen?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 20, 2006 8:51 AM

What is the exception that you are getting? I ran a test by writing an FTP server that did not respond to the QUIT command. When the exception fired I called Abort and the app still worked.
pwroblewski

From: Austin, TX USA
Posts: 38
Member Since: 11/21/03
posted February 21, 2006 1:57 PM

The error I'm recieving from the close command is this [The token supplied to the function is invalid]. I then catch that error and execute the Abort command. The abort command does not hang all the time, but when it does, I have to click on my application to get it to start back up. Here is the code that calls the close and abort commands:
  Private Sub DoLogout()
    Dim blnConnectionState
    AddLog("Logging out ..." & vbCrLf)
    If Ftp1.Connected = False Then Exit Sub

    Try
      ' Try Graceful Logout first
      Ftp1.Close()
      LogToFile("DoLogout", "FTP Connection closed cleanly")
    Catch e As Exception
      ' Just kill it then
      LogToFile("DoLogout", "FTP Connection did not close cleanly, Connection ABORT executed. Error[" & Err.Description & "]Exception[" & e.Message & "]blnConnectionState[" & blnConnectionState & "]")
      Ftp1.Abort()
      LogToFile("DoLogout", "Right After FTP1.Abort")
      Exit Sub
    End Try
  End Sub
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 21, 2006 3:11 PM

In order to track down a problem like that I would need to be able to duplicate it. If you can figure out a way to allow us to duplicate this, please send the necessary info to support@dart.com.

At the very least we would need to see a trace log (using the Trace event) of a session during which the error occurred.
pwroblewski

From: Austin, TX USA
Posts: 38
Member Since: 11/21/03
posted February 21, 2006 3:45 PM

How do I turn the Trace on. I have an event function of FTP1_Trace(ByVal sender as Object, ByVal e as SegmentEventArgs) Handles FTP1.Trace

I added a function in there that logs to a file, but it isn't firing. Is there a boolean value someplace I need to set?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 22, 2006 8:39 AM

Doe the event fire if you use our sample app? I just tried and it seemed to work for me.
pwroblewski

From: Austin, TX USA
Posts: 38
Member Since: 11/21/03
posted February 22, 2006 8:50 AM

The event does fire in the example application FTPListView. What would stop the trace event from firing in my app?
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX