I have a method which returns the content of a webpage:
private string FetchHTML(string sUrl, Encoding encoding)
{
System.Net.WebClient oClient = new System.Net.WebClient();
oClient.Encoding = encoding;
return System.Web.HttpUtility.HtmlDecode(oClient.DownloadString(sUrl));
}
But when I try to load a link from livejournal (for instance, http://mos-jkh.livejournal.com/769579.html) then I am getting this exception at DownloadString:
The request was aborted: The operation has timed out.
Is it a known issue? Why doesn't DownloadString work for some webpages and is there a solution for this? Or is there an alternative to DownloadString?