title: PlatformNotSupportedException for HttpClientHandler.SslProtocol on .NET 4.7.1
body: <p>I have following code in .NET Framework 4.7.1:</p>
  
  <pre><code>using (var handler = new HttpClientHandler())
  {
      handler.SslProtocols = SslProtocols.Tls12;
  
      ...
  }
  </code></pre>
  
  <p>This code works on my development machine (Windows 10 Enterprise, Build 17101/rs4_release. 180211-1040; Version 1803; OS Build 17101.1000).</p>
  
  <p>The same code (when published to service fabric cluster nodes which already have .net framework 4.7.1 installed) causes following exception:</p>
  
  <pre><code>System.PlatformNotSupportedException: Operation is not supported on this platform.
  </code></pre>
  
  <p>The cluster nodes are running Windows Server 2012 R2 Data Center, Version 6.3 (Build 9600)</p>
  
  <p>When the code is decompiled using Resharper, my desktop shows the following information:</p>
  
  <pre><code>// Type: System.Net.Http.HttpClientHandler
  // Assembly: System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  // MVID: 7D453494-012A-4FA4-9E04-1C64E3A0FB6F
  // Assembly location: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Net.Http\\v4.0_4.0.0.0__b03f5f7f11d50a3a\\System.Net.Http.dll
  </code></pre>
  
  <p>and it shows following on the another local server machine:</p>
  
  <pre><code>// Type: System.Net.Http.HttpClientHandler
  // Assembly: System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  // MVID: 641F4770-704A-420A-A419-A4FAF4195ADD
  // Assembly location: C:\Windows\Microsoft.NET\Framework\\v4.0.30319\\System.Net.Http.dll
  </code></pre>
  
  <p>As you can see the assembly locations are different, but I don't know what this means. In addition, my local machine has this value for registry key:</p>
  
  <pre><code>"Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\Release": "461802"
  </code></pre>
  
  <p>and cluster node has this:</p>
  
  <pre><code>"Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\Release": "461310"
  </code></pre>
  
  <p>The <a href="https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#net_b" rel="noreferrer">documentation on how to determine the installed framework version</a> says:</p>
  
  <pre><code>On all other OS versions: 461310
  </code></pre>
  
  <p>but the version "461802" from my machine is not even listed there!</p>
  
  <p>Can someone please provide guidance on how to get past this error (without changing my code)?</p>