.NET 6 Kestrel HTTP3 and QUIC linux exception This platform doesn't support QUIC or HTTP/3

Viewed 55

I'm implementing gRPC server using NET 6 C# and try to add QUIC protocol

services.Configure<KestrelServerOptions>(serverOptions =>
{
       serverOptions.ListenAnyIP(900, o =>
       {
           o.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
           o.UseHttps();
      });
            
     serverOptions.ListenAnyIP(890, o =>
     {
           o.Protocols = HttpProtocols.Http3;
           o.UseHttps();
     });   
});

Server deployed on Amazon linux. sudo yum install -y libmsquic was started. But I'm receiving exception as below

Unhandled exception. System.InvalidOperationException: This platform doesn't support QUIC or HTTP/3.
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()

Please suggest, what I'm missing?

1 Answers

Microsoft documentation says NET 6 is only compatible with the 1.9.x versions of libmsquic. Libmsquic 2.x is not compatible due to breaking changes. Libmsquic receives updates to 1.9.x when needed to incorporate security fixes.

sudo yum install -y libmsquic-1.9*

Additional using o.Protocols = HttpProtocols.Http3; Kestrel don't open port. I.e. we need HttpProtocols.Http1AndHttp2AndHttp3;

Related