title: HTTP/2 with ASP.NET Core 2.2
body: <p>I'm trying to get HTTP/2 working with ASP.Net Core 2.2. I'm testing on Windows 10 x64 1809. </p>
  
  <p>I'm using the basic template with the following web host builder:</p>
  
  <pre><code>public static IWebHostBuilder CreateWebHostBuilderKestrel(string[] args)
  {
      var builder = WebHost.CreateDefaultBuilder(args)
          .UseStartup&lt;Startup&gt;()
          .UseKestrel(options =&gt;
          {
              options.Listen(IPAddress.Any, 35000,
                  lo =&gt;
                  {
                      lo.Protocols = HttpProtocols.Http1AndHttp2;
                      lo.UseHttps(@"path to cert");
                  });
          });
      return builder;
  }
  </code></pre>
  
  <p>When using Chrome it accepts the certificate and shows the site over HTTPS. The problem is that it's using HTTP/1.1 and not h2 when checking the network requests in the devtools section.</p>
  
  <p>Using <code>openssl s_client -connect 'host:35000' -cipher "EDH"</code> gives the following output:</p>
  
  <pre><code>New, TLSv1.2, Cipher is DHE-RSA-AES256-GCM-SHA384
  Server public key is 2048 bit
  Secure Renegotiation IS supported
  Compression: NONE
  Expansion: NONE
  No ALPN negotiated
  SSL-Session:
      Protocol  : TLSv1.2
      Cipher    : DHE-RSA-AES256-GCM-SHA384
      Session-ID: FA0F0000C66FFFD36BE15AE79B2F48DF631EB83D0425DD534DAA278622CB30AE
      Session-ID-ctx:
      Master-Key: 2B10E9FD71B42328CAFAFBE18789777132565A98CE8CFD9B8E0452F6490929CB6D1B20AB57A000EDBFF40372C93EB547
      PSK identity: None
      PSK identity hint: None
      SRP username: None
      Start Time: 1552937526
      Timeout   : 7200 (sec)
      Verify return code: 20 (unable to get local issuer certificate)
      Extended master secret: yes
  ---
  </code></pre>
  
  <p>The one thing that looks out of place is "No ALPN negotiated" and "Secure Renegotiation IS supported". Am I missing anything here? </p>
  
  <p><a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2#http2-support" rel="nofollow noreferrer">The msdn site lists the following requirements</a>:</p>
  
  <pre><code>TLS version 1.2 or later
  Renegotiation disabled
  Compression disabled
  Minimum ephemeral key exchange sizes:
  Elliptic curve Diffie-Hellman (ECDHE) [RFC4492] – 224 bits minimum
  Finite field Diffie-Hellman (DHE) [TLS12] – 2048 bits minimum
  Cipher suite not blacklisted
  </code></pre>
  
  <p>Not sure how I'd check most of these settings. Some of these seem like settings of the certificate, while others seem application specific.</p>