title: .NET 4.5.2 - Communicate with other servers that use TLS 1.2 if mine uses TLS 1.0?
body: <p>My API runs on a service which uses TLS 1.0. We use the <a href="https://www.smartystreets.com/" rel="nofollow noreferrer">SmartyStreets</a> geolocation API, which <a href="https://www.smartystreets.com/blog/2019/10/removing-old-versions-of-tls" rel="nofollow noreferrer">requires clients to use TLS 1.2</a>.</p>
  <p>I am unable to update our .NET framework version or our TLS settings due to compatibility issues with some legacy applications.</p>
  <p>I was able to add this just before my <code>HttpClient</code> GET request:</p>
  <pre class="lang-cs prettyprint-override"><code>ServicePointManager.Expect100Continue = false;
  ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  HttpResponseMessage response = await http.GetAsync(smartyStreetsUri);
  </code></pre>
  <p>This actually allows me to get a response from SmartyStreets about 40% of the time. All other requests I get the error below. I am using the same GET URI every time:</p>
  <blockquote>
  <p>An error occurred while sending the request.,  Exception:
  System.Net.WebException: The underlying connection was closed: An
  unexpected error occurred on a send. ---&gt;  System.IO.IOException:
  Unable to read data from the transport connection: An existing
  connection was forcibly closed by the remote host. ---&gt;
  System.Net.Sockets.SocketException: An existing connection was
  forcibly closed by the remote host</p>
  </blockquote>
  <p>Is there anyway I can get a good, consistent response from a server using TLS 1.2 when I am on TLS 1.0?</p>