I have created a small windows forms application to upload the file to one of our client\'s ftp site. But the problem that I\'m having is that when I run this application on
This error can be caused because of several reasons like file is not present on server, security permissions on file etc. etc.
First you need to find out the exact cause of error. This can be achieved by using following code-
try
{
//Your code
}
catch(WebException e)
{
String status = ((FtpWebResponse)e.Response).StatusDescription;
}
Once you get the exact cause of error, you can go forward to solve it.
Here are some links you can refer
http://forums.asp.net/t/1777881.aspx/1
http://nickstips.wordpress.com/2010/10/25/c-ftp-upload-error-the-remote-server-returned-an-error-550-file-unavailable-e-g-file-not-found-no-access/
http://www.dreamincode.net/forums/topic/76361-file-upload-to-server/
http://forums.asp.net/t/1374306.aspx/1
Just to throw my hat in the ring, I was getting the same error. When the FTPRequest was requesting files from the FTP Service on the same computer (same IP). In the request I was using the IP address of the machine but once I changed that to 127.0.0.1 it worked. interestingly enough, requests from other IP addresses were being processed and files downloaded, just not from itself.
Hope that helped someone.
Try this: ftp://xxx.xxx.xx.xx:21//path/filename
The "//" after the server address starts you out at the root directory. Even though I had: ftp://xxx.xxx.xx.xx:21/path/filename, it didn't take me to the correct directory.