this worked for me..
string Http_URL = HttpUtility.UrlDecode(URL);
HttpWebRequest lObjReq = (HttpWebRequest)HttpWebRequest.Create(Http_URL);
lObjReq.Timeout = 36000;
lObjReq.UseDefaultCredentials = true;
if (lObjReq.GetResponse().ContentLength > 0)
{
Output_Err = "";
lStrLog = URL + " is a Valid URL.";
return true;
}
else
{
lStrLog = Output_Err = "Invalid URL or Web Service.";
return false;
}