title: C# check website is alive
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/186894/best-way-to-test-if-a-website-is-alive-from-a-c-sharp-applicaiton">Best way to test if a website is alive from a C# applicaiton</a>  </p>
  </blockquote>
  
  
  
  <p>I need to find website is running in c#
  I am passing the website on port 80.</p>
  
  <p>I am using the following code in c#</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://tester.co.tt");
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>I have given invalid website address, then also i am getting response is OK.</p>
  
  <p>How can we check website is running?</p>
  
  <p>I am getting the response.StatusCode is OK.
  when i browse the site,it is not avialable.</p>