I would like to know if there is any default settings one can use to test FTP settings etc, i am doing an application that does database backups , then zips the backup and FTP it to the server, i believe it is working because at the moment i am using these settings
***FTP refers to the class i wrote that handles the ftp
Now this works all good and all but ftp.secureftp-test.com obviously declines my attempt to upload the files, does anyone know any better idea or location ??
AsyncCallback m_callback = new AsyncCallback(CloseConnection);
try
{
// Logging in to the server
m_ftp.Login();
// PROBLEM !!! ????
m_ftp.RemotePath = ".";
// PROBLEM !!! ????
m_ftp.UploadDirectory("Backups/", false);
// Uploading the selected file
m_ftp.Upload("c://DBNAME.bak.zip");
// Closing class
m_ftp.Close();
}
catch(Exception Ex)
{
// Messagebox shows errors
MessageBox.Show("File transfer protocol failed " + Ex.Message);
// Sending error Mail
MailOnError(sender, e);
}
Application.DoEvents();
}
I am uncertain about the "m_ftp.UploadDirectory("Backups/", false);" part , because it tries to FTP to my own PC, is there any other way of setting a path on a server ??
The Path should be Root -> Backups -> File must save here
"Root->Backups" whats this? this isnt a directory format, simple answer you need to log in using a command line ftp to your ftp server, look at the directories it gives you and work out the path relative to where you want to go and then change to it.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.