Last post Mar 18, 2015 12:29 PM by PatriceSc
Mar 18, 2015 10:59 AM|mmacneill123|LINK
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!
Mar 18, 2015 11:23 AM|PatriceSc|LINK
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.
Mar 18, 2015 12:04 PM|mmacneill123|LINK
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!
Mar 18, 2015 12:29 PM|PatriceSc|LINK
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?)