URI not recognised with FTPS RRS feed

  • Question

  • User-1668220527 posted

    Hi folks

    Trying to FTP  from code to Azure FTP.  Works fine with FTP using the FTP:// address.  However, using the address ftps://waws-prod-db3-019.ftp.azurewebsites.windows.net/site/wwwroot/ which is displayed in the portal, it fails on the line

    request = (FtpWebRequest)WebRequest.Create(ftpUrl);

    with the message 'the URI prefix is not recognised'.

    However, 99% sure that FTPS should be a valid prefix whereas SFTPS I know would not be!

    Any ideas?

    Wednesday, March 18, 2015 10:59 AM


All replies

  • User753101303 posted


    Which is correct. I helped a coworker once and it seems TLS negotiation is just part of FTP. See https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.enablessl(v=vs.110).aspx for a code sample (ie use ftp and EnableSsl).

    My guess is that http/https is needed as you have no control over the client side and needed a way to tell the browser what should be used but this is actually a special case.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 18, 2015 11:23 AM
  • User-1668220527 posted

    Thanks for that,

    Makes a bit more sense now, I assume FTP:// address .EnableSSL=true means it is is implicit TLS whereas FTPS:// would be explicit and WebRequest must not support explicit!

    Wednesday, March 18, 2015 12:04 PM
  • User753101303 posted

    Ah yes we came accross also that. FTP with switching explicitely TLS on is preferred over FTPS which is outdated since long (if I remember for safety reason which surprised me first).

    Edit: unsure but I gave a quick look and it seems that implicit SSL negotiation was not well defined (I speculate here but maybe it could lead sometimes to choose an encryption that is not the best that could have been used?)

    Wednesday, March 18, 2015 12:29 PM