AspNetCore 2.2 AspNetCoreHostingModel InProcess not working
See original GitHub issueHi, if you create a new AspNetCore 2.2 project and add LightInject.Microsoft.DependencyInjection package, configure the container in ConfigureServices
var container = new ServiceContainer(); return container.CreateServiceProvider(services);
when you run it blows with :
System.InvalidOperationException: ‘No service for type ‘Microsoft.AspNetCore.Hosting.Server.IServer’ has been registered.’
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
After the release of .net core 3.1, hostingModel="inprocess ...
The asp.net core apps are running at the Kestrel. But starting with 2.2, the asp.net core module uses an in-process server implementation for ......
Read more >ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1
Ran into a nasty little issue with a hosted ASP.NET Core 3.1 application where InProcess hosting was not working.
Read more >In process hosting is not supported for AspNetCoreModule. ...
I have created a Asp.net core web application. I am able to rebuild successfully but when I try to publish the solution to...
Read more >In-process hosting with IIS and ASP.NET Core
Configure the port and base path the server should listen on when running behind the ASP.NET Core Module. Configure the host to capture...
Read more >Export to PDF fails from ASP.NET Core 2.2 projects
This setting results in a problem when exporting a report in PDF in ASP.NET Core 2.2 projects. The problem is general and is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There you go: options.DefaultServiceSelector = serviceNames => serviceNames.SingleOrDefault(string.IsNullOrWhiteSpace) ?? serviceNames.Last();
Thanks
It sets a couple of options that makes LightInject 100% compliant with the default container in Microsoft.Extensions.DependencyInjection.
https://github.com/seesharper/LightInject.Microsoft.DependencyInjection/blob/0b57968e2328f62bc262da9ce75d431954c82cfc/src/LightInject.Microsoft.DependencyInjection/LightInject.Microsoft.DependencyInjection.cs#L207