Can't connect to FTP: (553) File name not allowed

前端 未结 10 2051
别那么骄傲
别那么骄傲 2020-12-03 11:36

I need to FTP a file to a directory. In .Net I have to use a file on the destination folder to create a connection so I manually put Blank.dat on the server using FTP. I che

10条回答
  •  既然无缘
    2020-12-03 11:55

    Although replying to an old post just thought it might help someone.

    When you create your ftp url make sure you are not including the default directory for that login.

    for example this was the path which I was specifying and i was getting the exception 553 FileName not allowed exception

    ftp://myftpip/gold/central_p2/inbound/article_list/jobs/abc.txt
    

    The login which i used had the default directory gold/central_p2.so the supplied url became invalid as it was trying to locate the whole path in the default directory.I amended my url string accordingly and was able to get rid of the exception.

    my amended url looked like

    ftp://myftpip/inbound/article_list/jobs/abc.txt
    

    Thanks,

    Sab

提交回复
热议问题