Error reported from library

Hi there, i need to write a program using your library component to send a file to another server. Every time my code executes, it reports that the connectionstatus = 2.

How can i fix this error, i have changed to passive mode as port mode wasnt connecting at all.

I have attached he log that is created and the setting for the code i am using.

LOG

[20060119 12:00:40] SmartFTP FTP Library v1.5.7.5
[20060119 12:00:40] Resolving host name "81.17.67.248"
[20060119 12:00:40] Connecting to 81.17.67.248 Port: 21
[20060119 12:00:40] Connected to 81.17.67.248.
[20060119 12:00:40] 220 Microsoft FTP Service
[20060119 12:00:40] USER XXXXXX
[20060119 12:00:40] 331 Password required for XXXXXX.
[20060119 12:00:40] PASS (hidden)
[20060119 12:00:40] 230 User XXXXXX logged in.
[20060119 12:00:40] SYST
[20060119 12:00:40] 215 Windows_NT
[20060119 12:00:40] FEAT
[20060119 12:00:40] 211-FEAT
[20060119 12:00:41] SIZE
[20060119 12:00:41] MDTM
[20060119 12:00:41] 211 END
[20060119 12:00:41] TYPE I
[20060119 12:00:41] 200 Type set to I.
[20060119 12:00:41] REST 0
[20060119 12:00:41] 350 Restarting at 0.
[20060119 12:00:41] PWD
[20060119 12:00:41] 257 "/" is current directory.
[20060119 12:00:41] CWD /
[20060119 12:00:41] 250 CWD command successful.
[20060119 12:00:41] PWD
[20060119 12:00:41] 257 "/" is current directory.
[20060119 12:00:41] PASV
[20060119 12:00:41] 227 Entering Passive Mode (81,17,67,248,19,202)
[20060119 12:00:41] Opening data connection to 81.17.67.248 Port: 5066
[20060119 12:00:41] LIST
[20060119 12:00:41] 205 bytes transferred. (2.50 KB/s) (80 ms)
[20060119 12:00:41] 125 Data connection already open; Transfer starting.
[20060119 12:00:41] 226 Transfer complete.
[20060119 12:00:41] SmartFTP FTP Library v1.5.7.5
[20060119 12:00:41] SmartFTP FTP Library v1.5.7.5
[20060119 12:00:42] SmartFTP FTP Library v1.5.7.5
[20060119 12:00:42] SmartFTP FTP Library v1.5.7.5
[20060119 12:00:42] QUIT
[20060119 12:00:42] 221
[20060119 12:00:42] Client closed the connection.


SETTINGS BEING USED TO MAKE CONNECTION

Set Global = CreateObject("sfFTPLib.Global")

Global.LoadLicenseKeyFile("C:\LicenseKey.txt")

' Host settings
FTP.Host = "81.17.67.248"
FTP.Port = 21
FTP.Username = USERNAME
FTP.Password = PASSWORD
FTP.Timeout = 60

' Set Port Mode
FTP.Passive = True

' Log File
FTP.LogFile = "FTPLog.log"
FTP.HidePassword = True

' Set client name
FTP.Client = "ME"

ConnectionError = FTP.Connect()

RESPONSE.WRITE FTP.ConnectionStatus & "<br>"

' Connect to host and check that the connection was successful
If ConnectionError = 0 Then

ConnectionError = FTP.ChangeDirectory("/")

If ConnectionError = 0 Then _
ConnectionError = FTP.ReadDirectory()

End If

' THIS ALWAYS REPORTS THE CONNECTION STATUS AS 2!!!
response.write "END OF ESTABLISH = " & FTP.ConnectionStatus & "<BR>"

End If

Hello ..

If the ConnectionStatus property is set to 2 it means it's connected:
typedef enum enumConnectionStatus
{
[helpstring("ConnectionStatus ftpConnectionStatus Unknown")] ftpConnectionStatusUnknown = 0,
[helpstring("ConnectionStatus ftpConnectionStatus Connecting")] ftpConnectionStatusConnecting = 1,
[helpstring("ConnectionStatus ftpConnectionStatus Connected")] ftpConnectionStatusConnected = 2,
[helpstring("ConnectionStatus ftpConnectionStatus Disconnecting")] ftpConnectionStatusDisconnecting = 3,
[helpstring("ConnectionStatus ftpConnectionStatus Disconnected")] ftpConnectionStatusDisconnected = 4
} enumConnectionStatus;

It looks like you are trying to connect to an already connected connection.

BTW: You may want to upgrade to the latest version of the SmartFTP FTP Library.
https://www.smartftp.com/ftplib/download

Regards,
-Mat