title: Invalid URI: Invalid port specified / The hostname could not be parsed
body: <p>I'm trying to upload a file to a remote server's FTP.</p>
  
  <p>When I try using:
  <a href="ftp://user:pass@ftp.host.com/name.txt" rel="nofollow">ftp://user:pass@ftp.host.com/name.txt</a></p>
  
  <p>I get this error:
  <strong><em>Invalid URI: Invalid port specified.</em></strong></p>
  
  <p>When I try using:
  <a href="ftp://[user:pass@ftp.host.com]/name.txt" rel="nofollow">ftp://[user:pass@ftp.host.com]/name.txt</a></p>
  
  <p>as suggested in several posts, </p>
  
  <p>I get this error:
  <strong><em>Invalid URI: The hostname could not be parsed.</em></strong></p>
  
  <p>This is my code for upload:</p>
  
  <pre><code>using (System.Net.WebClient webClient = new System.Net.WebClient())
  {
      webClient.UploadFile(new Uri(ftpAddress), @"C:\inetpub\wwwroot\name.txt");
  }
  </code></pre>