Skip to content

No service for type 'Microsoft.AspNetCore.Server.Kestrel.Core.IHttpsConfigurationService' after upgrading to .NET 8 preview #48956

@timmydo

Description

@timmydo

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Our existing application fails to startup:

System.InvalidOperationException: No service for type 'Microsoft.AspNetCore.Server.Kestrel.Core.IHttpsConfigurationService' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.EnableHttpsConfiguration()
   at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
   at SerpHost.Kestrel.KestrelServerWrapper.SerpKestrelServerOptionsSetup.SetListenOptions(ListenOptions options2, IKestrelConfig kestrelConfig, X509Certificate2 certificate, Dictionary`2 sniCerts) in D:\dbs\el\sn2\private\frontend\Serp\app\host\KestrelServerWrapper.cs:line 233

Expected Behavior

Not throw an exception

Steps To Reproduce

We aren't using the web host builder. The new interface or given implementation does not appear to be public.

Exceptions (if any)

No response

.NET Version

8.0.100-preview.5.23303.2

Anything else?

f1bbdd4
@amcasey

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions