title: requested url is invalid for this ftp command
body: <p>I am trying to upload a csv file to ftp location but it fails everytime with the above reason.</p>
  
  <p>My code fails at: <code>Stream requestStream = request.GetRequestStream();</code></p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
          {
  
              // Get the object used to communicate with the server.
              FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://100.100.100.83");
              request.Method = WebRequestMethods.Ftp.UploadFile;
  
              // This example assumes the FTP site uses anonymous logon.
              request.Credentials = new NetworkCredential("guardian", "roar");
              request.KeepAlive = true;
              request.UsePassive = false;
              // Copy the contents of the file to the request stream.
              StreamReader sourceStream = new StreamReader("C:/blacklists/blacklist.csv");
              byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
              sourceStream.Close();
              request.ContentLength = fileContents.Length;
  
              Stream requestStream = request.GetRequestStream();
              requestStream.Write(fileContents, 0, fileContents.Length);
              requestStream.Close();
  
              FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  
              Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription);
  
              response.Close();
          }
      }
  }
  </code></pre>