Hi there,

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.Server = "ftp.secureftp-test.com";
ftp.Username = "test";
ftp.Password = "test";
***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 ??

Thanks in advance...

mr VonZipper

Cool , i realized my problem is not my actual domain, its the path i"m specifying, so i have this

private void FTP_Upload(object sender, EventArgs e)
            FileStream fs_Upload = new FileStream(txtTo.Text + "/" + txtName.Text + ".zip", FileMode.Open, FileAccess.Read, FileShare.Read);

            // Creating strings to hold values
            string m_server = txtftpServerName.Text;
            string m_username = txtftpUserName.Text;
            string m_password = txtftpPassword.Text;
            string m_UploadFile = fs_Upload.ToString();
            string m_directory = txtftpServerName + "Backups/";

            m_ftp.Server = txtftpServerName.Text;
            m_ftp.Username = txtftpUserName.Text;
            m_ftp.Password = txtftpPassword.Text;

            AsyncCallback m_callback = new AsyncCallback(CloseConnection);

                // Logging in to the server

                // PROBLEM !!! ????
                m_ftp.RemotePath = ".";
               // PROBLEM !!! ????
                m_ftp.UploadDirectory("Backups/", false);

                // Uploading the selected file

                // Closing class
            catch (Exception Ex)
                // Messagebox shows errors
                MessageBox.Show("File transfer protocol failed " + Ex.Message);

                // Sending error Mail
                MailOnError(sender, e);


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

Any help Please ...

"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.

This article has been dead for over six months. Start a new discussion instead.