title: C# FTP with WebClient Error: The remote server returned an error: (534) 534 Policy requires SSL
body: <p>The purpose of my code is to upload some data to a FTP location.</p>
  
  <p>With my code I keep getting an error stating that the remote server requires SSL. I am using a .NET version greater then 4. All the other posts suggest I add the <code>ServicePointManager</code> code that I have below. </p>
  
  <p>The exception occurs on <code>client.UploadData</code>.</p>
  
  <p>Still no dice. Any help would be very much appreciated.</p>
  
  <pre><code>ServicePointManager.ServerCertificateValidationCallback +=
      (sender,certificate, chain, sslPolicyErrors) =&gt; true;
  ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
  byte[] data = stream.ToArray(); //Data I want to upload to FTP location
  
  using (WebClient client = new WebClient())
  {
      client.Credentials = new NetworkCredential("*Username*", "*Password*");
      client.UploadData("ftp://file.example.com/Content/file", "STOR", data);
  }
  </code></pre>