I've exhausted all my resources at this point, so I come asking for help.
I have a client that has given me a username and password to their ftp site. However, to access it on the web uses https://ftps.sitename.com
To access on FileZilla, I can either use ftps:// or sftp://
My problem is that I have no idea what I need to do to access it inside my program.
Right now I have this code:
var ftpFilePath = @"ftp://ftps.sitename.com/file.txt";
var request = (FtpWebRequest)WebRequest.Create(ftpFilePath);
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.Credentials = new NetworkCredentials(username, pass);
// enable SSL?
var response = (FtpWebResponse)request.GetResponse();
// Other code
It's currently failing on GetResponse with the error that it cannot connect to the remote server. If I use "ftps://ftps.sitename.com" then I get an error complaining about the prefix.
This is my first time dealing with this type of problem, and I must have missed something small. Any help is greatly appreciated.
EDIT:
I ended up using the WinSCP package and followed this tutorial: https://winscp.net/eng/docs/library_session_getfiles
Two problem I ran into is that I don't have a ssh key, so I am temporarily setting
GiveUpSecurityAndAcceptAnySshHostKey = true
And then I ran into a small issue of making sure the process that runs VS had access to the path I was attempting to write the file to.