Trying to download xml file from https URL (https://nvd.nist.gov/download/nvd-rss.xml)
This URL is openly accessible through browser.
Using C# Webclient with console project.
But getting Exception as below
using (WebClient client = new WebClient())
{
System.Net.ServicePointManager.SecurityProtocol =
System.Net.SecurityProtocolType.Ssl3;
client.DownloadFile(uri, @"c:est
vd-rss.xml");
}
$exception {"The underlying connection was closed: An unexpected error occurred on a send."} System.Net.WebException
Tried adding all properties like SSL etc to system.Net, but did not help.
See Question&Answers more detail:os