Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.6k views
in .NET FTP by (300 points)
Hi,
I've been working with edtftp for a day now and been trying solve this problem most of the time.
On my development area I have following code running fine. On the Connected event I'm uploading the files (see the second code block).
However, when I shift this to the production it is failing to connect and I'm struggling to see why. The credentials I'm using are correct as I can connect with FileZilla. I have listed the log output below. Any help is appreciated.
Thanks

   ftp.ServerAddress = testserver;
   Logger.CurrentLevel = Level.ALL;
   ftp.UserName = usrnme;
   ftp.Password = pass;

   try
   {
      ftp.Connect();
   }
   catch(Exception ex){logerror}



This is the code within The FTP Connected event.
------------------------------------------------------------------
   try
   {      
   if (ftp.IsConnected)
      {
         string sfile = "C:\log.dmp"
         ftp.ChangeWorkingDirectory("htdocs/test");
         ftp.UploadFile("log.dmp");
      }
   }
   catch(Exception ex2)
   {logerror}



DEBUG [FTPControlSocket] 2 Feb 2007 10:25:45.515 : 220-IPv6 connections are also welcome on this server.
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:45.515 : 220 Please note: files for your website must be stored under the htdocs directory.
ALL [FTPConnection] 2 Feb 2007 10:25:45.525 : Invoking delegate EnterpriseDT.Net.Ftp.FTPConnectionEventHandler
ALL [FTPConnection] 2 Feb 2007 10:25:45.525 : Have GUI control
ALL [FTPConnection] 2 Feb 2007 10:25:45.525 : GUI control invocation not required
ALL [FTPConnection] 2 Feb 2007 10:25:45.525 : Invoking delegate dynamically
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:45.535 : ---> CWD htdocs/test
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:45.786 : 530 You aren't logged in
ALL [FTPConnection] 2 Feb 2007 10:25:45.796 : Invoking delegate EnterpriseDT.Net.Ftp.FTPConnectionEventHandler
ALL [FTPConnection] 2 Feb 2007 10:25:45.796 : Have GUI control
ALL [FTPConnection] 2 Feb 2007 10:25:45.796 : GUI control invocation not required
ALL [FTPConnection] 2 Feb 2007 10:25:45.796 : Invoking delegate dynamically
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:45.796 : ---> CWD htdocs/test
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:46.016 : 530 You aren't logged in
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:47.979 : ---> QUIT
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:48.229 : 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
DEBUG [FTPControlSocket] 2 Feb 2007 10:25:48.229 : 221 Logout.

2 Answers

0 votes
by (162k points)
For some reason you aren't logging in, which is supposed to happen automatically by default.

Make sure that the AutoLogin property on FTPConnection is set to true.

In the log output you should see USER and PASS commands being sent to the server - that is the client logging in. If you don't see this, auto login has failed for some reason.
0 votes
by (300 points)
OK my fault.
I moved the code from the Connected event to LoggedIn event, and things are good. Thanks for swift reply.

Categories

...