| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: FTP .NET - An existing connection was forcibly closed |
| larryaasen From: Herndon, VA USA Posts: 14 Member Since: 10/24/03 |
posted October 24, 2003 11:09 AM The Dart FTP component seems to work fine most of the time. There is one issue. My application uses FTP to copy two files from one server to another at one minute intervals. That turns out to be 120 Puts per hour. I let the application run overnight and I got some exceptions using Put at irregular intervals ranging from once an hour to once every 3 hours. This is my sequence of events for each copy: 1. Try to create the directory where the file will go. The directory is usually already there, so this fails normally. 2. Change directory to the desired directory. 3. Put the file. 4. Sleep for one minute. I never close the connection so it should be open most of the time since there is no connect command. It never has an exception in the Invoke command to change the directory. This is the error I get with Put: "An existing connection was forcibly closed by the remote host". What does this mean and how can I prevent this? I log the exception in the Event Log including the stack trace and this is what it says each time: Event Type: Error Event Source: FileTransferSvc Event Category: None Event ID: 0 Date: 10/23/2003 Time: 9:35:53 PM User: N/A Computer: ATAWFDINT Description: ftp1: FTPTransferManager.UploadFile: dart Put error C:\Inetpub\wwwroot\FlightDispatch\FileList.txt Exception: An existing connection was forcibly closed by the remote host Stack: Server stack trace: at c.c(Delegate A_0, Object[] A_1) at Dart.PowerTCP.Ftp.Tcp.b(Byte[] A_0, Int32 A_1, Int32 A_2) at Dart.PowerTCP.Ftp.TcpStream.Read(Byte[] buffer, Int32 offset, Int32 size) at Dart.PowerTCP.Ftp.SegmentedStream.Read(Byte[] buffer, Byte[] delimiter, Int32 offset, Int32 count, Boolean& found) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at c.c(Delegate A_0, Object[] A_1) at Dart.PowerTCP.Ftp.Ftp.Put(String localFileName, String remoteFileName) at FlightDispatch.FileTransferSvc.FTPTransferManager.UploadFile(FtpPro ftp, String filePath) Thanks for any help you can give. -Larry |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 24, 2003 2:19 PM The server is probably closing the connection due to inactivity, but it's not being detected until you try to send something over the connection. |
| larryaasen From: Herndon, VA USA Posts: 14 Member Since: 10/24/03 |
posted October 24, 2003 4:52 PM Since I continue to transfer files once every minute I wouldn't think the server was closing the connection due to inactivity. Also, I immediately conduct a change directory before the Put which does not give an error. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 24, 2003 5:09 PM Maybe the server went down for a minute? Unfortunately without seeing it duplicated I can only offer guesses. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|