Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
idFTP Problem
#5
Hi Remy, Thanks for being so patient with me once again. I have tried adding the suggested setting without Joy. I've listed my current code below. This works perfectly on my home system and copies the desired files to the ftp server. I verify that they are on the server with FileZilla. I've copied the executable to the office server and monitored the process. When I run the program from the office the program fails after the line BobMessage("step2" with the message "entering extended passive mode ..." It never reached step 3 from the office. I can copy files to the ftp server using FileZilla with the same login credentials.

void __fastcall TSendFTP::dbConnectClick(TObject *Sender)
{
dbFTP->Passive = true;
dbFTP->Port = 21;
dbFTP->PassiveUseControlHost = true;
dbFTP->Host = myhost;
dbFTP->Username = myusername;
dbFTP->Password = mypassword;
String resultstext = "ftp unknown failure"; // email report text
bool success = false;

try
{
dbFTP->Connect();
try
{
dbFTP->ChangeDir("//public_html//Map");
Main->BobMessage("Step 2 ");
GetRemoteFilenames();
Main->BobMessage("Step 3 ");
CopyDBtoFTPServer(); // copies files from aisla folder to ftp server
GetRemoteFilenames(); // check on results
resultstext = "Backed up: ";
success = true;
}
catch(const Exception &ex) {
resultstext = "database backup failed, error: [" + const_cast<Exception&>(ex).ClassName() + "] " + ex.Message;
}
catch(...) {
resultstext = "database ftp unknown failure"; ;
}
}
catch(const Exception &ex) {
resultstext = "database backup failed, error: [" + const_cast<Exception&>(ex).ClassName() + "] " + ex.Message;
}
catch(...) {
resultstext = "database ftp unknown failure"; ;
}
if (success == true)
dbFTP->Disconnect();
Main->BobMessage(resultstext.c_str());
}
Reply


Messages In This Thread
idFTP Problem - by OldBob1938 - 10-31-2022, 07:23 PM
RE: idFTP Problem - by rlebeau - 11-01-2022, 04:04 PM
RE: idFTP Problem - by OldBob1938 - 11-09-2022, 04:32 PM
RE: idFTP Problem - by rlebeau - 11-09-2022, 06:44 PM
RE: idFTP Problem - by OldBob1938 - 11-12-2022, 06:00 PM
RE: idFTP Problem - by rlebeau - 11-14-2022, 09:35 PM
RE: idFTP Problem - by OldBob1938 - 11-19-2022, 09:12 PM
RE: idFTP Problem - by rlebeau - 11-22-2022, 11:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)