title: UploadFile / Webclient - Timeout configuration
body: <p>I'm have:</p>
  
  <pre><code>using (System.Net.WebClient client = new System.Net.WebClient())
             {          
                 client.Credentials = new System.Net.NetworkCredential(usuario, senha);
                  DirectoryInfo diretorio2 = new DirectoryInfo(@"C:\");
                 FileInfo[] Arquivos2 = diretorio2.GetFiles("*.*");
                 foreach (FileInfo fileinfo2 in Arquivos2)
                 {
                 client.UploadFile("ftp://" + ftp + "/" + dir + fileinfo2.Name, @"C:\" + fileinfo2.Name);
                 }
  </code></pre>
  
  <p>I'm having some problems with this code, maybe firewall ... I needed to put a timeout to display a messagebox with the cause of the problem, how can I configure the timeout in that case?</p>