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 .......' –