TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
6
18.6k
C# WebClient throws error while downloading a URL String
May 18 2017 9:41 AM
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
Reply
Answers (
5
)
How to replace id in url with some title.
I have a trouble with JSON Querryy