title: C# Absolute URI removes ".." from URL
body: <p>I have to upload a file via FTP to <a href="ftp://ftp.remoteServer.com" rel="noreferrer">ftp://ftp.remoteServer.com</a></p>
  
  <p>My root directory on remoteServer contains an "upload" and a "download" folder. I need to put my file in the "upload" directory.  But on log in, the server automatically puts me in the "download" folder. </p>
  
  <p>I tried doing this:</p>
  
  <pre><code>string serverTarget = "ftp://ftp.remoteServer.com/";
  serverTarget += "../upload/myfile.txt";
  Uri target = new Uri(serverTarget);
  FTPWebRequest ftp = (FTPWebRequest)FtpWebRequest.Create(target);
  
  using(Stream requestStream = ftp.GetRequestStream()) {
      // Do upload here
  }
  </code></pre>
  
  <p>This code fails with: (550) File unavailable (e.g., file not found, no access)
  I debugged the code, and <code>target.AbsoluteUri</code> returns as <a href="ftp://ftp.remoteServer.com/upload" rel="noreferrer">ftp://ftp.remoteServer.com/upload</a> instead of <a href="ftp://ftp.remoteServer.com/../upload" rel="noreferrer">ftp://ftp.remoteServer.com/../upload</a>  (missing the ..)</p>
  
  <p>If I put <a href="ftp://ftp.remoteServer.com/../upload" rel="noreferrer">ftp://ftp.remoteServer.com/../upload</a> in a browser, I can log in and verify this is the correct place where I want to put my file.  </p>
  
  <p>How can I get the FTPWebRequest to go to the correct place?</p>