Hi,
A URL was working fine for last many months but suddenly stops working in C# but the same URL is working in Excel VBA using MSXML2.XMLHTTP60 request.
I tried Webclient and HTMLAgility but both fails in dowloading string from a web URL
private void webClienttry()
{
WebClient webClient = new WebClient();
string result = webClient.DownloadString("https://www.komplett.no/category/10448/tv?subcategory=11157_TV-er&hits=200");
Console.WriteLine(result);
}
Error:
System.Net.WebException: 'The underlying connection was closed: An unexpected error occurred on a send.'
IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Can anyone help me finding the cause of error.
Thanks
Regards/Sachin

Robert Raboud46 reputationPosted May 18, 2017, 6:23 AM EDT
string result = webClient.DownloadString("https://www.komplett.no/category/10448/tv?subcategory=11157_TV-er&hits=200");
Console.WriteLine(result);
Johnson A17 reputationPosted Jun 6, 2018, 4:06 AM EDT
Dao Huong6 reputationPosted Aug 16, 2018, 8:43 AM EDT
Uwe Keim3 reputationPosted Sep 2, 2018, 11:02 AM EDT
Atta Kumah165 reputationPosted May 22, 2020, 12:50 AM EDT