| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: Connection Attempt Failed |
| tsramkumar From: Ashburn, VA USA Posts: 3 Member Since: 11/06/08 |
posted November 6, 2008 12:32 AM Hi I have upgraded to the new version for Power TCP FTP for .Net and my application is having with the FTP while trying to test out with the new version. I am able to FTP a file successfulyl but when I ftp another file subsequently, I keep getting this exception "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond". Could you please help? Thanks TSR |
| tsramkumar From: Ashburn, VA USA Posts: 3 Member Since: 11/06/08 |
posted November 6, 2008 12:41 AM Here is the code that I used. ftp1.Server = <MyServerName>; ftp1.Username = <Uid>; ftp1.Password = <MyPwd> ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.SiteParameters, "recfm=fb"); ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.SiteParameters, "408"); ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.NoOp); ftp1.Put(@"C:\ss72007.txt", "'Test.Dataset'"); ftp1.Put(@"C:\ss72008.txt", "'Test.Dataset.t2'"); // Close the connection ftp1.Close(); I am getting the above exception on the subsequent Put command. My firewall is off. |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted November 10, 2008 11:24 AM We need you to wire up the trace event and send us a log of the communications between the ftp server and your application. Here is a code snippet to accomplish this: 'Wire up the trace event to your ftp control this.ftp1.CertificateRequested += new System.EventHandler(this.ftp1_CertificateRequested); //The event will fire whenever data is sent or received private void Ftp1_Trace(object sender, Dart.PowerTCP.Ftp.SegmentEventArgs e) { // Create FileStream to write to log file System.IO.FileStream stream1 = new System.IO.FileStream("c:\\FtpTest\\log.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite); // Create text to precede sent/received data. byte[] recv = System.Text.ASCIIEncoding.ASCII.GetBytes("\r\nReceived <-- \r\n"); byte[] sent = System.Text.ASCIIEncoding.ASCII.GetBytes("\r\nSent --> \r\n"); // Set the stream position to append. stream1.Position = stream1.Length; // Check if data is incoming or outgoing and write appropriate data if(e.Segment.Sent == true) stream1.Write(sent, 0, sent.Length); else stream1.Write(recv, 0, recv.Length); // Write the data stream1.Write(e.Segment.Buffer, e.Segment.Offset, e.Segment.Count); // Close the stream stream1.Close(); } ------ |
| tsramkumar From: Ashburn, VA USA Posts: 3 Member Since: 11/06/08 |
posted November 10, 2008 1:41 PM Hi Here is the log of the FTP ommunications. Looks like the second ftp put command didn't log anything.I had removed the site commands and just had two subsequent "put" commands. The first one seemed to work fine from the log and the second one threw the exception. ftp trace log ============= 220-FTP 18:33:15 on 2008-11-10. 220-FTP 18:33:15 on 2008-11-10. 220- 220- 220- WARNING 220- 220-This system is private and may only be accessed if authorized. All 220-contents are confidential and proprietary and may not be viewed or 220-used in any way without prior authorization. Unauthorized use is 220-subject to prosecution or discipline by owner. Verizon reserves the 220-right to monitor system and network activity. 220- 220- 220 Connection will close if idle for more than 5 minutes. 220- 220- 220- WARNING 220- 220-This system is private and may only be accessed if authorized. All 220-contents are confidential and proprietary and may not be viewed or 220-used in any way without prior authorization. Unauthorized use is 220-subject to prosecution or discipline by owner. Verizon reserves the 220-right to monitor system and network activity. 220- 220- 220 Connection will close if idle for more than 5 minutes. USER xxxxxx USER xxxxxx 331 Send password please. 331 Send password please. PASS xxxxxx PASS xxxxxx 230 xxxxxx is logged on. Working directory is "xxxxxx.". 230 xxxxxx is logged on. Working directory is "xxxxxx .". PASV PASV 227 Entering Passive Mode (166,37,128,194,10,92) 227 Entering Passive Mode (166,37,128,194,10,92) STOR 'ZH.T.DEV.SS7.REQ.FTP11' STOR 'ZH.T.DEV.SS7.REQ.FTP11' 125 Storing data set ZH.T.DEV.SS7.REQ.FTP11 125 Storing data set ZH.T.DEV.SS7.REQ.FTP11 250 Transfer completed (data was truncated) 250 Transfer completed (data was truncated) |
| Jamie Powell (Admin) From: Rome, NY USA Posts: 448 Member Since: 03/13/07 Extra Support Options Custom Application Development |
posted November 11, 2008 9:34 AM Hello, this issue needs to be handled through our administrative procedures prior to response. Please contact sales@dart.com directly regarding this issue. Thank you. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|