LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I frequently get FTP command failures when using Inet tool kit functions.

I have an application which uses the internet to ftp files to a web host site. I use the ftp functions provided in the Iternet tool kit to develop my application. When I run the project I frequently get a non-fatal run time error -17 FTP command failure after logging in and immediately trying to download a directory file list. The problem is intermittent, with no apparent changes in the software to account for successes and failures. I am running Labwindows CVI 5.0 under Windows 98 on a 500Mhz machine. My access to the internet is dial-up. When I run ftp applications manually I rarely get errors. Am I dealing with a time out problem, and if so where do you set timers for the
FTP functions in the tool kit.
0 Kudos
Message 1 of 3
(3,153 Views)
Try using the sample project in cvi\cviinet\samples\ftpclnt to see if you get the same behavior. It is a pretty well structured ftp client application.

It is hard to tell what is happening when developing client applications because you have no control over the server in most cases. I doubt you are getting a timeout condition, because usually you will get a -4 error code for that. It seems like the server is just rejecting your requests to view the entire directory. My suggestion would be to try getting the dir list until you no longer receive the -17 code, because I think the server may just be slow in allowing its entire directory to be visible.

If the sample project I mentioned works good for you, try to stick with its general sequence of events in your applicat
ion too.

Hope that helps you out.

Jason Foster
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 3
(3,153 Views)
Jason
The project you suggested above is the project giving us problems. When I run this program as provided it takes a long time to respond to my log in response, when I run it slightly modified to satisfy our user needs it fails but in a very short period of time. I will try to determine why our modified program responds quickly with a failure while the unmodified waits a long time with success. We modified this project to include a timer event which initiates file transfers at specific intervals, I think this is the only change made. We test our program by disabling the timer event and running it manually like the initial sample project.
0 Kudos
Message 3 of 3
(3,153 Views)