FTP testing ...
Please support our C# advertiser: DiscountASP.NET – 3 Months Free on C# Web Hosting
![]() |
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
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
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
Last edited by cVz : Jan 7th, 2009 at 3:51 am.
Delphi & C# programmer deluxe...
Cool , i realized my problem is not my actual domain, its the path i"m specifying, so i have this
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 ...
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);
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
Any help Please ...
Last edited by cVz : Jan 7th, 2009 at 6:42 am.
Delphi & C# programmer deluxe...
•
•
Posts: 1,734
Reputation:
Solved Threads: 184
"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.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
![]() |
Similar Threads
Other Threads in the C# Forum
- Looking for an easy hosting solution (Web Hosting Deals)
- DreamWeaver 8: FTP information does not save for sites (HTML and CSS)
- Gigabit network slow samba, ftp, iperf? (Networking Hardware Configuration)
- Help beta testing new CMS (PHP)
- Trying real hard to set up a Web FTP server (Networking Hardware Configuration)
- Unable to FTP (*nix Software)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- hijacked to wqzaa.dll CWS variant? (Viruses, Spyware and other Nasties)
- Asp Hosting ? (ASP)
- Buying a new computer (Geeks' Lounge)
Other Threads in the C# Forum
- Previous Thread: Splitting of wav files
- Next Thread: c# windows server 2003
•
•
•
•
Views: 401 | Replies: 5 | Currently Viewing: 1 (0 members and 1 guests)






Linear Mode