title: How to enable TLS 1.2 in Asp.Net Core 3.1
body: <p>I am working on Asp.Net Core 3.1 project. I am testing locally. I started getting errors as</p>
  <p>Your connection is not fully secure
  This site uses an outdated security configuration, which may expose your information (for example, passwords, messages or credit cards) when it is sent to this site.
  NET::ERR_SSL_OBSOLETE_VERSION</p>
  <p>The connection used to load this site used TLS 1.0 or TLS 1.1, which are deprecated and will be disabled in the future. Once disabled, users will be prevented from loading this site. The server should enable TLS 1.2 or later.</p>
  <p><a href="https://i.stack.imgur.com/uZKWc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uZKWc.png" alt="enter image description here" /></a></p>
  <p>I have even enabled TLS 1.2 from Program.cs as below -</p>
  <pre><code>public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
          Host.CreateDefaultBuilder(args)
              .ConfigureWebHostDefaults(webBuilder =&gt;
              {
                  webBuilder.ConfigureKestrel(serverOptions =&gt;
                  {
                      serverOptions.ConfigureHttpsDefaults(co =&gt;
                      {
                          co.SslProtocols = SslProtocols.Tls12;
                      });
                  }).UseStartup&lt;Startup&gt;();
              });
  </code></pre>
  <p>But still same error.</p>
  <p>Can you please guide how to resolve this issue?</p>