For a project, we need to communicate with an FTP Server over SSL (ftps)
I wrote the following code:
var ftpRequest = (FtpWebRequest)WebRequest.Create(ftpServer);
ftpRequest.EnableSsl = true;
ftpRequest.Credentials = new NetworkCredential(username, password);
ftpRequest.Method = WebRequestMethods.Ftp.ListDirectory;
var response = (FtpWebResponse)ftpRequest.GetResponse();
var streamReader = new StreamReader(response.GetResponseStream());
var directories = new List<string>();
When executing the example I get the following exception.
SSL cannot be enabled when using a proxy.
At our company, we are behind a firewall a proxy, but that should not avoid the communication because e.g. over the windows explorer I can connect to the Server.
What can I do?