locked
FTP Error 550

    Question

  • Hello... I'm a newbie programming in .NET C#  having trouble uploading files to an FTP Server. I use the background worker to upload the files.
    What the program does is just upload files selected by the user to a static ftp server.
    The first selected files are sent well, but when the program finishes the first files, I give the user the option to go back and select some more files to send, and then it's when the 550 error happens.
    I can't figure why this happens because the filename is right and doesn't exist in the server; the path is right, the user has access.

    The function that uploads is pasted in the following URL:
    http://www.wilcob.com/Wilco/Pastecode/5133/showpaste.aspx


    I could use some help, and I welcome all attempts.
    Thanks.
    Friday, August 31, 2007 1:25 AM

Answers

  • You can copy/paste the results from the trace log and we'll take a look.

    If you're uploading, then 550 means that the path is not correct.

     

    I looked at your code and this line jumped at me:

    string uri = "ftp://" + ftpServerIP + "/" + ftpPath + filename;

    Does ftpPath end with "/"? If not you have to add it the way add after ftpServerIP.

     

    Mariya

     

    Wednesday, September 05, 2007 5:01 AM
  • Finally found the problem. Can't understand how I couldn't see it in the first place.
    The problem was indeed the ftpPath but it was not the slashes. It was an concatenation that wasn't on the code I've posted.
    Now the problem is solved. Thank you all.
    Wednesday, September 05, 2007 3:30 PM

All replies

  • You'll have to verify the granted user rights, because error 550 means that the user does not have sufficient priviliges...
    Friday, August 31, 2007 6:01 AM
  • The user rights are OK. Just think... if I can upload the first files without a problem why would it be a user rights problem.
    Friday, August 31, 2007 10:05 AM
  • 550 means "Requested action not taken", and it can be caused by access permissions, but also other causes such as invalid path or file name.

     

    Does the server send any accompanying text along with the 550 error code to give more details as to the problem?  Also you might try a network sniff comparing the first successful upload with the first unsuccessful upload to see what you're doing differently.

     

    Lance

    http://geekswithblogs.net/Lance

    Friday, August 31, 2007 2:10 PM
  • The FTP server doesn't return anything more besides the 550 Error.
    The Path is valid, I've tested it, and the file doesn't exist.
    If I could see the FTP log maybe I could see the problem but I don't know how...
    Friday, August 31, 2007 7:56 PM
  • This is still a mistery... I can't find any work around... isn't there anybody that can help me?
    Saturday, September 01, 2007 10:46 PM
  • The exact error is: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
    Sunday, September 02, 2007 4:29 PM
  • Well, if the file does not exist, and you're trying to download it the 550 error is the correct behavior you should get.

     

    To see the log, you can either use System.Net log tracing or Network Monitor. Instructions on how to use those can be found here

     

    http://blogs.msdn.com/dgorti/archive/2005/09/18/471003.aspx

    http://blogs.msdn.com/dgorti/archive/2005/10/29/486887.aspx

     

    Mariya

     

    Tuesday, September 04, 2007 8:12 AM
  • I'm not trying to download it... I'm trying to upload it!
    Nobody had a look at the code...
    Trying to get the log now to see if I can understand the error.
    Tuesday, September 04, 2007 1:34 PM
  • You can copy/paste the results from the trace log and we'll take a look.

    If you're uploading, then 550 means that the path is not correct.

     

    I looked at your code and this line jumped at me:

    string uri = "ftp://" + ftpServerIP + "/" + ftpPath + filename;

    Does ftpPath end with "/"? If not you have to add it the way add after ftpServerIP.

     

    Mariya

     

    Wednesday, September 05, 2007 5:01 AM
  • Finally found the problem. Can't understand how I couldn't see it in the first place.
    The problem was indeed the ftpPath but it was not the slashes. It was an concatenation that wasn't on the code I've posted.
    Now the problem is solved. Thank you all.
    Wednesday, September 05, 2007 3:30 PM