Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/3 configuration in ASP.NET Core 6 preview 5 throws an error on startup #34351

Closed
JuergenGutsch opened this issue Jul 14, 2021 · 3 comments
Closed
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. HTTP3 Status: Resolved

Comments

@JuergenGutsch
Copy link

Describe the bug

I tried to configure HTTP/3 as described in this post:
https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-3/
This throws an error on startup:

Cannot start HTTP/3 server if no IMultiplexedConnectionListenerFactory is registered.

I stumbled upon that while writing a blog post about HTTP/3 in ASP.NET Core 6.

I had a quick search in the aspnetcore repo to find an implementation of the IMultiplexedConnectionListenerFactory, but just fon the implementation for the Quic transport. @JamesNK added the Quic transport to the HTTP/3 epic (#15271) does this mean HTTP/3 runs over Quic?

I tried to use quick to get it running, but I got different errors. I guess it is not yet ready in the preview 5.

To Reproduce

  • create a new MVC project using dotnet new mvc
  • add the code to configure HTTP/3 as shown in the blog post
  • don't forget to add code to load a certificate
  • run the application using dotnet run

Exceptions (if any)

Building...
warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Overriding address(es) 'https://localhost:5001, http://localhost:5000'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
Unhandled exception. System.InvalidOperationException: Cannot start HTTP/3 server if no IMultiplexedConnectionListenerFactory is registered.
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_0`1.<<StartAsync>g__OnBind|0>d.MoveNext() in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x6001092+0x45
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x600041f+0x80
   at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x60002fb+0x77
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x6000f5c+0x9b
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x600041c+0xc7
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x600027d+0x193
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) in Microsoft.AspNetCore.Server.Kestrel.Core.dll:token 0x600027a+0x108
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) in Microsoft.AspNetCore.Hosting.dll:token 0x60000b0+0x235
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) in Microsoft.Extensions.Hosting.dll:token 0x6000061+0x177
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) in Microsoft.Extensions.Hosting.Abstractions.dll:token 0x600001e+0x93
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) in Microsoft.Extensions.Hosting.Abstractions.dll:token 0x600001e+0x1be
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) in Microsoft.Extensions.Hosting.Abstractions.dll:token 0x600001d+0x15
   at Http3Tls.Program.Main(String[] args) in C:\git\hub\aspnetcore6\Http3Tls\Program.cs:line 19

Further technical details

dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.5.21302.13
 Commit:    d6380bcae7

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\

Host (useful for support):
  Version: 6.0.0-preview.5.21301.5
  Commit:  ec3e0b276b
@BrennanConroy
Copy link
Member

HTTP/3 isn't supported until preview 7.

@BrennanConroy BrennanConroy added the ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. label Jul 14, 2021
@ghost ghost added the Status: Resolved label Jul 14, 2021
@JuergenGutsch
Copy link
Author

Thanks @BrennanConroy
Good to know. 👍 Unfortunately, that fact isn't mentioned in the blog post about the preview 3.
People (at least me) are trying the new features mentioned there.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. HTTP3 Status: Resolved
Projects
None yet
Development

No branches or pull requests

5 participants