远程服务器返回错误: (404) 未找到。 如何处理--最后26分了
最后26分了 ,只能给这么多,还是希望有高手能帮忙Dim url2 As String = "http://www.ttxxppuu.cn/user/223344"
Dim tempStr As String
Dim request As Net.WebRequest = WebRequest.Create(url2)
Dim response As WebResponse = request.GetResponse()
Dim stream As IO.Stream = response.GetResponseStream()
Dim sr As StreamReader = New StreamReader(stream, Encoding.GetEncoding("utf-8"))
tempStr = sr.ReadToEnd
调试到这段程序时response As WebResponse = request.GetResponse()会报错:远程服务器返回错误: (404) 未找到。
网址在IE中打开,确实也是找不到页面的
但我现在需要的是,不理会报错,让程序继续执行下去,或者当出现这个错误时跳过这段程序也行 --------------------编程问答-------------------- 加上On Error Resume Next
补充:.NET技术 , VB.NET