How can I
check an address URL exists or not ?
I have this code :
private void check(string path)
{
try
{
Uri uri = new Uri(path);
WebRequest request = WebRequest.Create(uri);
request.Timeout = 3000;
WebResponse response;
response = request.GetResponse();
}
catch(Exception loi) { MessageBox.Show(loi.Message); }
}
but that error message about the proxy :(
help me
I have this code :
private void check(string path)
{
try
{
Uri uri = new Uri(path);
WebRequest request = WebRequest.Create(uri);
request.Timeout = 3000;
WebResponse response;
response = request.GetResponse();
}
catch(Exception loi) { MessageBox.Show(loi.Message); }
}
but that error message about the proxy :(
help me

Kirtan PatelRank #292 · 8.6K reputationPosted Mar 7, 2010, 1:20 AM EST
bool Test = true; Uri urlCheck = new Uri(url); WebRequest request = WebRequest.Create(urlCheck); request.Timeout = 15000; WebResponse response; try { response = request.GetResponse(); } catch (Exception) { Test false; //url does not exist } if(Test== false) { //url does not exist }Sam HobbsRank #107 · 20.5K reputationPosted Mar 6, 2010, 6:29 PM EST
microstar6 reputationPosted Mar 6, 2010, 9:34 PM EST
Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.
Sam HobbsRank #107 · 20.5K reputationPosted Mar 6, 2010, 11:36 PM EST
Altaf Patel72 reputationPosted Mar 24, 2010, 2:55 AM EDT