我試圖連接到一個網站,但它一直返回該錯誤,即使我可以在我的瀏覽器訪問網站:WebRequest.GetResponse - 遠程服務器返回錯誤:(404)未找到
An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code
Additional information: The remote server returned an error: (404) Not Found.
我很確定我的代碼是正確的,因爲我最近使用了相同的代碼,但不能解決它爲什麼返回一個錯誤,有什麼建議嗎? 我的代碼:
OddsTodayREQUEST = WebRequest.Create("http://www.betexplorer.com/next/soccer/")
Using OddsTodayRESPONSE As WebResponse = OddsTodayREQUEST.GetResponse()
Using OddsTodayREADER As New StreamReader(OddsTodayRESPONSE.GetResponseStream())
OddsTodayHTML = OddsTodayREADER.ReadToEnd()
End Using
End Using
404 =頁面不存在。你能在瀏覽器中點擊該網站上的確切頁面嗎? – GibralterTop
是的,我可以在我的瀏覽器中找到它 – HitmanHeathcote