| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: Connection Fails |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 11:55 AM Error: "A connection attempt failed because the connected party did not properly respond after a period of time" I receive the above error when trying to pull a 171kb file off my ftp server. The following function below is just a test function that works inside my firewall. If I use an outside line into our server, it gives me the above error. Both In and Out on the FTP server port 21 are enabled. Any ideas or suggestions? Thanks, Josh |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 11:58 AM I forgot to include the test function. // Set the server & user info ftp1.Server = "Server"; ftp1.ServerPort = 21; ftp1.Username = "ME"; ftp1.Password = "something"; ftp1.Passive = false; // "Enable" certificate authentication (verify any certificate the server sends) ftp1.UseAuthentication = false; // Connect to a secure server using explicit SSL ftp1.Security = Dart.PowerTCP.SecureFtp.Security.ExplicitControlOptional; string FileToGet = "PESVBUD.dat"; // Put method returns an FtpFile object containing information about the file transfer Dart.PowerTCP.SecureFtp.FtpFile file; listBox1.Items.Add("Attempting to get file " + FileToGet); // Get the file, saving it to the application path with the same filename. try { file = ftp1.Get(FileToGet, Application.StartupPath + "\\" + FileToGet); } catch(Exception ex) { listBox1.Items.Add("Error: " + ex.Message); return; } // Success! Display info about the file. listBox1.Items.Add("Successfully retrieved file " + file.RemoteFileName); // Close the connection //ftp1.Close(); Thanks, Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 11:59 AM You need use passive mode to get through a firewall. Make sure that you set Ftp.Passive to true You will also need to set "UseControlAddressForPassive" to true. |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 12:05 PM Same Error if i set passive and UseControlAddressForPassive to true. Thanks, Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 12:10 PM Are you sure you want to use ExplicitControlOptional? What happens if you set it to Explicit? If that doesn't fix it, then please try to use our sample ListView app and then post the replies that appear in the log window. |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 12:14 PM Setting it to explicit gives me the following "Error: Request: PASV Response: 213 175724" Thanks, Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 12:23 PM That looks like the response to the SIZE command? What happens with the sample ListView app? |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 12:28 PM When I connect it connects fine. What exactly is it doing differently than what I am doing. Thanks, Josh |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 12:32 PM I just now noticed I have ExplicitControlOptional selected instead of Epxlicit. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 12:40 PM I'm sorry, I am confused. Are you saying that everything is working now? |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 12:41 PM My fault, No it still doesn't work. The ExplicitcontrolOptional was set on the Listview Sample. That was how I was able to login without a problem. WHen I use Explicit, I get a Token supplied to the function is invalid. Thanks, Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 12:44 PM I will need to test this myself. Please contact us via email (support@dart.com) so that you can supply us with the username, password and address of the server. |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 1:06 PM the Listview error's out on the User's Machine when trying to Initialize the SSL connection. Thanks, Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 19, 2005 1:19 PM Have you sent the info I requested yet? Please do so now so that I can assist you. |
| Jster From: Stockbridge, GA USA Posts: 9 Member Since: 12/19/05 |
posted December 19, 2005 1:21 PM The information has been sent. THanks, Josh |
| srik From: stamford, CT USA Posts: 8 Member Since: 03/10/06 |
posted March 10, 2006 4:16 PM Hi I am getting similar error 'Token supplied to user is invalid' when using the listview example, with a secure ftp server. Can I pls. know the resolution of this issue. Thanks Srikanth |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|