Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: Socket Exception while uploading
stevensonb

From: Morthwell, United Kingdom
Posts: 2
Member Since: 11/07/02
posted November 7, 2002 3:59 AM

We have a piece of code that ftps our web site changes to a 3rd party server on a daily basis. Intermitantly, the following socket exception is throughen

System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Server stack trace:
  at v.b(Delegate A_0, Object[] A_1)
  at Dart.PowerTCP.Ftp.Tcp.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
  at m._j(Byte[] A_0, Int32 A_1, Int32 A_2)
  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 v.b(Delegate A_0, Object[] A_1)
  at Dart.PowerTCP.Ftp.Ftp.Put(String localFileName, String remoteFileName)

We’ve been looking at it and unable to track down the problem; has anyone had a similar problem and come up while an answer? Or, is there a way to re-establish the socket and carry on?
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted November 7, 2002 9:21 AM

A Trace log may turn up something. Check out the Ftp.Trace topic in the docs (ms-help://PowerTCPFTP/PowerTCPFTP/Dart.PowerTCP.Ftp.Ftp.Trace.html) for instructions on creating a Trace log.

Also, is the 3rd party server always online, or does it ever get shut down/rebooted? This may be the cause. You could write code to catch the socket exception, then try to resume the download. See the Ftp.Restart property (ms-help://PowerTCPFTP/PowerTCPFTP/Dart.PowerTCP.Ftp.Ftp.Restart.html) for more info.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted November 7, 2002 9:25 AM

Oh yeah, and be sure you have the latest version:

http://www.dart.com/downloads/FtpDotNet.msi
stevensonb

From: Morthwell, United Kingdom
Posts: 2
Member Since: 11/07/02
posted November 7, 2002 9:54 AM

Thanks for those pointers. I've just spoken to the 3rd party supplier and they are now admiting that their ftp server is the problem, but the upgrade is 1-2 months away and that may slip! Thanks again.
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX