3
我试图用这个代码从一个网页的内容:提供了无效的请求URI。 URI必须是绝对URI或BaseAddress请求必须设置
HttpClient http = new HttpClient();
var response = await http.GetByteArrayAsync("www.nsfund.ir/news?p_p_id=56_INSTANCE_tVzMoLp4zfGh&_56_INSTANCE_tVzMoLp4zfGh_mode=news&_56_INSTANCE_tVzMoLp4zfGh_newsId=3135919&p_p_state=maximized");
String source = Encoding.GetEncoding("utf-8").GetString(response, 0, response.Length - 1);
source = WebUtility.HtmlDecode(source);
HtmlDocument resultat = new HtmlDocument();
resultat.LoadHtml(source);
,但我得到这个错误:
提供了无效的请求URI。请求URI必须是绝对URI或BaseAddress必须设置。
尝试'HTTP:// WWW .......' –