0

I am trying to access an ftp site via c# but I am having difficulty connecting to the site thru code. I'm using ipswitch ftp tool to view the files, the address shows ftp-authssl://ftps5.XXXX.com/{UserName} after connection. I took the address and have tried many combinations using the code below:

        FtpWebRequest request = (FtpWebRequest)WebRequest.Create(RemoteFtpPath);
        request.Method = WebRequestMethods.Ftp.DownloadFile;

The error that I am getting is when I run the url mentioned above with the WebRequest.Create I get an error of URI prefix not recognized. Any help Thanks

JoeyDiaz
  • 137
  • 1
  • 2
  • 12
  • The "ftp-authssl" seems to indicate that its encrypted. Here are some useful links showing C# SFTP alternatives. https://stackoverflow.com/questions/8092180/how-to-use-sftp-in-c-sharp – PhillipH Jun 11 '18 at 21:09
  • @PhillipH Does that work for ftps, is there a library that is built in that can be used. How would I format the address? – JoeyDiaz Jun 11 '18 at 21:39
  • Sorry - I've never used the library myself - I only offer up the suggestion that your endpoint 'looks like' sftp so thats why your standard .net code might not be working. – PhillipH Jun 12 '18 at 06:21
  • @PhillipH when you say looks like sftp what do you mean since I see ftps – JoeyDiaz Jun 12 '18 at 15:36

0 Answers0