摘要:
加入try catch来判断,catch使用的WebException来处理try{ var request = WebRequest.Create(uri); using (var response = request.GetResponse()) { using (var responseStream = response.GetResponseStream()) { // Process the stream } }}catch (WebException ex){ if (ex.Status ... 阅读全文