c# application is crashing when the server is down
<p>I'm using this code, to fetch the latest version of my app in *Form1_Load*:</p>

<pre><code>string result1 = null;
string url1 = "http://site.com/version.html";
WebResponse response1 = null;
StreamReader reader1 = null;

try
{
   HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create(url1);
   request1.Method = "GET";
   response1 = request1.GetResponse();
   reader1 = new StreamReader(response1.GetResponseStream(), Encoding.UTF8);
   result1 = reader1.ReadToEnd();
 }
 catch (Exception ex)
 {
   // show the error if any.                
 }
 finally
 {
    if (reader1 != null)
         reader1.Close();
    if (response1 != null)
         response1.Close();
 }
</code></pre>

<p>The problem is that when I shut the server down the whole application is stucking and a window is popping out,saying:</p>

<blockquote>
  <p>Unable to connect to the remote server</p>
</blockquote>

<p>Which seems legit.</p>

<p>Is there a way to bypass this crash (when the server is down) and break out of the version checking?</p>
