| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: Control connection unexpectedly closed error on FTP Put Method |
| jasonmelo From: Providence, RI USA Posts: 2 Member Since: 12/21/04 |
posted December 21, 2004 4:35 PM I keep getting the following error on my console application: Control connection unexpectedly closed at c.Invoke(Delegate CurrentDelegate, Object[] args) at Dart.PowerTCP.Ftp.Ftp.Put(String localFileName, String remoteFileName) However when I connect using a manual WS FTP connection everything works fine. The file I am trying to transfer is a 1kb ASCII text file. My code follows: Dart.PowerTCP.Ftp.Ftp ftp1; ftp1 = new Dart.PowerTCP.Ftp.Ftp(); try { ftp1.Server = ConfigurationSettings.AppSettings["ftpServerUri"]; ftp1.Username = ConfigurationSettings.AppSettings["ftpUser"]; ftp1.Password = ConfigurationSettings.AppSettings["ftpPass"]; ftp1.ServerPort = 21; ftp1.Passive = true; ftp1.Timeout = 60000; ftp1.FileType = FileType.Ascii; ftp1.DoEvents = true; ftp1.Put(DartUtils.GetPath(ConfigurationSettings.AppSettings["csvPath"]) + PScsvFileName, PScsvFileName); if (ftp1.Connected) { ftp1.Close(); } } catch(Exception ex) { ftp1.Abort(); Console.WriteLine(ex.Message.ToString() + Environment.NewLine + Environment.NewLine + ex.StackTrace.ToString()); bIsError = true; } I am using identical code on an alternate application and everything works fine. The server I am trying to connect to is 215 UNIX Type: L8 Host type (2): UNIX (standard) Any help is greatly appreciated. I am using FTP.NET version 2.2.5 |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 21, 2004 4:51 PM Well it can't be the identical code, or else it would work. There has to be something different. Try implementing the trace event (like we do in samples) and see if the log file tells you what happened. |
| jasonmelo From: Providence, RI USA Posts: 2 Member Since: 12/21/04 |
posted December 21, 2004 4:58 PM When I say identical I mean the same code but transferring different files to a different FTP server. This is the only app connecting to this server....I tried the trace but there is no more particular info that would elude to the problem....thank you |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 21, 2004 5:07 PM The FTP server is accepting the connection, then closing it for some reason. It's probably a security issue. Check with the admin for the FTP server. He is the only one who could tell you. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|