Add a Worker Service to Web API Project February 10, 2022 Startup.cs public void ConfigureServices(IServiceCollection services) { services.AddHostedService<Worker>(); // the worker will run services.AddControllers(); } References https://stackoverflow.com/questions/58274763/hosting-web-api-in-net-core-worker-service-cannot-reference-iwebhostenvironme Related