I have a small command tool we use to get some data from a FTP server.
The matter is that the network is now after a proxy server and to connect to the FTP server the proxy mode is USER@HOST.
I found some samples to connect with this using a socket but no sample how to connect to using FtpWebRequest.
As I don't change the whole class I would prefer this way to connect ...
Is there a way how to do?
FtpWebRequest result = (FtpWebRequest)FtpWebRequest.Create(URI);
//Set the login details
result.Credentials = Credentials;//GetCredentials();
//Do not keep alive (stateless mode)
result.KeepAlive = true;
// Set Proxy if need for
wp = new WebProxy(Proxy);
wp = new WebProxy(Proxy,int.Parse(Port));
wp.Credentials = ProxyCredentials;
result.Proxy = wp;
result.UsePassive = true;