FTP File Upload with HTTP Proxy

前端 未结 13 1936
轻奢々
轻奢々 2020-12-05 07:48

Is there a way to upload a file to a FTP server when behind an HTTP proxy ?

It seems that uploading a file is not supported behind an HTTP Proxy using .Net Webclient

13条回答
  •  天命终不由人
    2020-12-05 08:08

    I've just had the same problem.

    My primary goal was to upload a file to an ftp. And I didn't care if my traffic would go through proxy or not.

    So I've just set FTPWebRequest.Proxy property to null right after FTPWebRequest.Create(uri).

    And it worked. Yes, I know this solution is not the greatest one. And more of that, I don't get why did it work. But the goal is complete, anyway.

提交回复
热议问题