Search code examples
c#.netftpftpwebrequestpassive-mode

Is it possible to use "Passive Mode" with FtpWebRequest


We have a process in place to upload a file nightly to a partner FTP site. They now require a passive connection and our uploads now fail. Is it possible for the .NET 4 FtpWebRequest to implement a passive connection instead of an active one? If so, can someone please provide an example?


Solution

  • Set the UsePassive property to true on the FtpWebRequest.