var strURL = "http://999.999.999.999"; // invalid IP-address
System.Net.WebResponse objResponse = default(System.Net.WebResponse);
System.Net.WebRequest objRequest = default(System.Net.WebRequest);
objRequest = System.Net.HttpWebRequest.Create(strURL);
objRequest.Timeout = 100;
objResponse = objRequest.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(objResponse.GetResponseStream());
result = sr.ReadToEnd();
我看到螢火蟲的超時時間爲3000毫秒......不應該那樣!WebRequest.Timeout未按預期工作
爲什麼不顯示Firebug的屏幕截圖?你看到了,但沒有人。 –