This is coding that i have created to detect invalid url from various examples online, the problem with this coding is when i enter url https://..... it display true, referring that the url does exist but when i try with either http://forums.asp.net/ or https://www.google.com.my/ it display false. Can anyone tell me why is that??
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(IsLinkValid(new Uri("https://google.com.my/")));
}
private Boolean IsLinkValid(Uri uri)
{
WebRequest request = WebRequest.Create(uri);
& ...
Go to the complete details ...