Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.8k views
in .NET FTP by (1.4k points)
using latest pro version to ws_ftp server.
I can connect with ftp explcit just fine. no issues connecting, However if I issue the GetFieInfos after I connect, it throws an exception as listed in the debug code below....what gives?
 SecureFTPConnection1.Connect()
          If SecureFTPConnection1.IsConnected Then               <-- shows true
              Dim fileDetails As FTPFile() = SecureFTPConnection1.GetFileInfos()   <-- errors on this line
             ...n
//debug listing...//
257 "/users/xfrFiles" is current directory
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:09.156 : ---> SYST
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:09.187 : 215 UNIX
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:09.203 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:09.250 : 227 Entering Passive Mode (x,0,0,x,xx,x).
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Sep 2006 18:50:12.656 : Testing connection
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:12.656 : ---> PWD
An unhandled exception of type 'EnterpriseDT.Net.Ftp.FTPException' occurred in edtftpnetpro.dll

Additional information: The FTP client has already been connected to the server.  The requested action must be performed before a connection is established.

DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:50:12.703 : 257 "/users/xfrFiles" is current directory
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Sep 2006 18:51:58.140 : Testing connection
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 Sep 2006 18:51:58.140 : ---> PWD

Unhandled Exception: EnterpriseDT.Net.Ftp.FTPException: The FTP client has already been connected to the server.  The requested action must be performed before a connection is established.
   at EnterpriseDT.Net.Ftp.FTPClient.a(Boolean A_0)
   at EnterpriseDT.Net.Ftp.FTPClient.set_RemoteHost(String value)
   at EnterpriseDT.Net.Ftp.Ssl.SSLFTPClient.set_RemoteHost(String value)
   at EnterpriseDT.Net.Ftp.SecureFTPConnection.set_ServerAddress(String value)
   at ccFTPS_CLient.ftpsTest.ftpConnection1_ReplyReceived(Object sender, FTPMessageEventArgs e) in E:\ccFTPS_CLient\ccFTPS_CLient\ccFTPS_CLient\ftpsTest.vb:line 200
   at EnterpriseDT.Net.Ftp.FTPMessageHandler.Invoke(Object sender, FTPMessageEventArgs e)
   at EnterpriseDT.Net.Ftp.FTPClient.b(Object A_0, FTPMessageEventArgs A_1)
   at EnterpriseDT.Net.Ftp.FTPControlSocket.Log(String msg, Boolean command)
   at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
   at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
   at EnterpriseDT.Net.Ftp.FTPControlSocket.CreateDataSocketPASV()
   at EnterpriseDT.Net.Ftp.FTPControlSocket.CreateDataSocket(FTPConnectMode connectMode)
   at EnterpriseDT.Net.Ftp.FTPClient.Dir(String dirname, Boolean full)
   at EnterpriseDT.Net.Ftp.FTPClient.DirDetails(String dirname)
   at EnterpriseDT.Net.Ftp.FTPConnection.GetFileInfos(String directory)
   at EnterpriseDT.Net.Ftp.FTPConnection.GetFileInfos()
   at ccFTPS_CLient.ftpsTest.btnConnect_Click(Object sender, EventArgs e) in E:\ccFTPS_CLient\ccFTPS_CLient\ccFTPS_CLient\ftpsTest.vb:line 172
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

2 Answers

0 votes
by (51.4k points)
According to the log, you have a ReplyReceived event-handler called ftpConnection1_ReplyReceived in the class, ccFTPS_CLient.ftpsTest. It looks like this tries to set the ServerAddress. You can't set the ServerAddress property while the SecureFTPConnection is connected to the server.

Is this an unintentional error, or is there a reason why you want to try to set the ServerAddress property here?

- Hans (EDT)
0 votes
by (1.4k points)
no reason. just copied/pasted from earlier edtftp free version. if you look at it long enough.....well you know the saying.
danke!!!

Categories

...