How To Get Error number in WebException Error?
try { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(\"site\"); HttpWebResponse response
You could try to parse the message, but there isn't always an error number. A timeout for example doesn't result in an HTTP error code.