J
Jon Maz
Hi All,
Here's the code:
HttpWebRequest HttpWReq =
(HttpWebRequest)WebRequest.Create("http://www.asdfasdfasdfafsd.com");
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
Response.Write(HttpWResp.StatusCode);
Here's what I would like it to return to me:
HTTP/1.1 400 Bad Request
And here's what it actually gives me:
The underlying connection was closed: The remote name could not be
resolved.
Any ideas how I can get the 400 code returned?
Thanks,
JON
Here's the code:
HttpWebRequest HttpWReq =
(HttpWebRequest)WebRequest.Create("http://www.asdfasdfasdfafsd.com");
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
Response.Write(HttpWResp.StatusCode);
Here's what I would like it to return to me:
HTTP/1.1 400 Bad Request
And here's what it actually gives me:
The underlying connection was closed: The remote name could not be
resolved.
Any ideas how I can get the 400 code returned?
Thanks,
JON