question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AspNetCore 2.2 AspNetCoreHostingModel InProcess not working

See original GitHub issue

Hi, 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
valeriobcommented, May 22, 2019

There you go: options.DefaultServiceSelector = serviceNames => serviceNames.SingleOrDefault(string.IsNullOrWhiteSpace) ?? serviceNames.Last();

Thanks

0reactions
seesharpercommented, May 22, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found