C# check URL exist ?

Mar 6 2010 8:49 AM
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

Answers (5)