How To Get Error number in WebException Error?
try { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(\"site\"); HttpWebResponse response
You can't do that because WebException(s) don't have error numbers. You can define your own error numbers if that's what you want/need to do.
WebException(s)
Here's the documentation You can get Status, Message, StackTrace, etc, etc.