ihostedservice Questions

5

Solved

I have an application that normally should be a simple console application to be programmed as a scheduled task from time to time called by the windows task scheduler. The program should launch som...

2

Solved

On ASP.NET Core I'm observing a strange behavior, that was actually reported in BackgroundService not shutting down, stoppingToken never set with .net core generic host but without the root cause e...
Balustrade asked 29/8, 2022 at 19:58

2

Solved

I can not figure out how to access the command line args in my ConsoleHostedService implementation class. I see in the sources CreateDefaultBuilder(args) somehow adds it to the configuration... nam...
Aparri asked 1/3, 2021 at 17:25

2

I have an API which contains a HostedService that is built in VS2022 with .Net 6. When I run locally the service is called as expected and everything works fine but when deplyed, the service doesn'...
Osmious asked 27/4, 2022 at 19:2

0

I have been investigating the us of the .NET generic host for hosting console applications. It seems like the recommended pattern for .NET going forwards allowing for easy use of DI, logging, confi...
Avogadro asked 24/12, 2021 at 6:37

1

How do I property register an class which contains both the IHostedService and a custom interface like IMyInterface? As in class BackgroundTaskScheduler : BackgroundService, ITaskScheduler {...} ...
Capture asked 19/6, 2020 at 21:5

1

I know prior to Asp.Net 3.0 (or 3.1), to manually start a BackgroundService, we could derive it from IHostedService instead and change the DI registration to: services.AddSingleton<IHostedServ...
Labrie asked 7/4, 2020 at 23:42
1

© 2022 - 2024 — McMap. All rights reserved.