- Home /
Question by
Phanou · May 26, 2019 at 10:11 PM ·
webrequeststreamreaderftp
FtpWebRequest and explicit ftp
Hello
I access file on my ftp folder without problem since last week.
Now I need to use explicit TLS security and nothing work well :(
I try to use EnableSsl but it's don't work.
Any idea ?
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://myurl.com/test.txt");
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.EnableSsl = true;
request.Credentials = new NetworkCredential(ftpLogin, ftpPassword);
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);
Console.WriteLine(reader.ReadToEnd());
Console.WriteLine("Download Complete, status {0}", response.StatusDescription);
reader.Close();
response.Close();
Error message :
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Mono.Security.Interface.TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_NOT_DONE\r\n at Mono.Unity.Debug.CheckAndThrow (Mono.Unity.UnityTls+unitytls_errorstate errorState, Mono.Unity.UnityTls+unitytls_x509verify_result verifyResult, System.String context, Mono.Security.Interface.AlertDescription defaultAlert) ...
Comment
Your answer
Follow this Question
Related Questions
How to use UnityWebRequest to access local text file on Andorid build 0 Answers
Get echo output from PHP script which is on an FTP server with C# 1 Answer
DownloadHandlerAssetBundle from password protected ftp server on Android 1 Answer
Download progress is -1 forever. 2 Answers
multiple webrequests, one exception causes next to time out, rest are fine 0 Answers