Answer the question
In order to leave comments, you need to log in
How to download a file from the internet using WebClient?
Good evening!
Wrote a code for downloading a file over the network in .net core Linux:
var link = "https://www.atsenergo.ru/nreport?fid=AFFD00AEC4F50010E053AC103C8C9DB4";
var net = new System.Net.WebClient();
byte[] file = net.DownloadData(link);
Exception has occurred: CLR/System.Net.WebExceptionWhat is missing for the program to work? By http, https ya.ru downloads.
An exception of type 'System.Net.WebException' occurred in System.Net.WebClient.dll but was not handled in user code: 'The SSL connection could not be established, see inner exception. Authentication failed, see inner exception.'
Inner exceptions found, see $exception in variables window for more details.
Innermost exception Interop.Crypto.OpenSslCryptographicException : error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question