Want to use C# (FtpWebResponse) to read file list from FTP, but it returns HTML

后端 未结 4 617
既然无缘
既然无缘 2020-12-11 08:54

I use below codes to get files from a FTP site. It works in my computer, but it only return HTML codes when I run it on another computer (I can see that the HTML are codes o

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 09:26

    Could it be a web proxy interfering? Try to get around the proxy by using the following:

    reqFTP.Proxy = GlobalProxySelection.GetEmptyWebProxy();
    

提交回复
热议问题