FtpWebRequest returns error 550 File unavailable

前端 未结 15 2266
醉梦人生
醉梦人生 2020-11-30 09:41

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

15条回答
  •  爱一瞬间的悲伤
    2020-11-30 10:16

    The server usually returns a relevant error message with the 550 code. But the FTP implementation in .NET framework translates all FTP status codes to its own (localized) message. Particularly code 550 is translated to "File unavailable". That, in many cases, hides away the real problem.

    Enable .NET logging to see the real error message from the server:
    Output log using FtpWebRequest


    Here are some various common scenarios that lead to 550 error:

    • FtpWebRequest returning "550 File unavailable (e.g. file not found, no access)" when using ListDirectoryDetails for a directory that exists
    • The remote server returned an error: (550) on upload file to FTP using FtpWebRequest

提交回复
热议问题