C# FTP 550 error

前端 未结 6 798
抹茶落季
抹茶落季 2021-01-20 03:31

I\'m trying to programatically download a file in C# via FTP, here is the relevant code (obviously with fake credntials and URI):

try
{
    var request = Ftp         


        
6条回答
  •  太阳男子
    2021-01-20 04:28

    Turns out the FTP root isn't necessarily the same as the URL root. Perhaps I'm mixing up terminology, so let me explain: in my case, connecting to ftp.mydomain.com already starts at /folder, so my URL needed to just be ftp://ftp.mydomain.com/file.zip. IE8 knows how to eliminate the redundant /folder part in the original path while the FtpRequest class does not, which is why it worked in IE8 but not in the C# code.

提交回复
热议问题