Hi All,
Here's the code:
HttpWebRequest HttpWReq =
(HttpWebRequest )WebRequest.Cre ate("http://www.asdfasdfasd fafsd.com");
HttpWebResponse HttpWResp = (HttpWebRespons e)HttpWReq.GetR esponse();
Response.Write( HttpWResp.Statu sCode);
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.Cre ate("http://www.asdfasdfasd fafsd.com");
HttpWebResponse HttpWResp = (HttpWebRespons e)HttpWReq.GetR esponse();
Response.Write( HttpWResp.Statu sCode);
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
Comment