asp.net-core-hosted-services Questions

1

Solved

Regardless of whether we should, can we use IHostedService in an Azure Functions App? Here is an attempt to register a hosted service (background service, specifically) as IHostedService: interna...

2

I am totally new to ASP.NET Core so I am probably missing something by 50 miles because I've spent 3 hours on this to no avail. I've made a Web App from within VS 2017, hosted by Kestrel which run...

2

In our ASP.Net Core Web API, we have used Hosted Services to perform some background tasks. Sometimes it is possible that these background tasks to take a long time to complete (about an hour). Eve...

1

Solved

Is it possible to run an IHostedService on only one instance of a scaled out Azure App Service in ASP.NET Core? Or would the solution be to run this IHostedService in its own app service with one i...

1

Solved

I am having the following Timer to run in .Net core Ihosted Service, TimeSpan ScheduledTimespan; string[] formats = { @"hh\:mm\:ss", "hh\\:mm" }; string strTime = Startup.Configuration["AppSetting...
Selfappointed asked 14/1, 2020 at 5:8

1

I'm trying to implement a hosted service and I was wondering what I am expected to do with the CancellationToken in the IHostedService.StartAsync call. There is quite a lot in the Microsoft docume...
Hyetal asked 4/12, 2019 at 15:41

1

Solved

Back in .net core 2, I had created a hosted service with a custom property like: public class MyService : BackgroundService { public bool IsRunning {get;set;} ... That I could setup in startup...

1

Solved

I have a .NET Core 2.2 web API that can be scaled out to several instances based on demand. This API has a background service (IHostedService) that should only run on one of the instances at a time...

1

In our MultiTenant ASP.NET Core 2.2 app, we determine the tenant from the URI. How can get the website URL from an IHostedService? The HttpContext is always null. The IHttpContextAccessor.HttpCon...

1

Solved

I've created a hosted service that executes a recurring task in .Net-Core. (I'm using shared hosting so I don't have control over iis) public class SchedulerService : IHostedService { private re...
Ganger asked 13/12, 2018 at 1:31

2

I have a hosted service that checks an email account every minute. I also am using MVC with Web API 2.1. In order to get my hosted service to start, I have to "wake it up" by calling API methods. A...

2

Solved

I'm doing some tests with the new Background tasks with hosted services in ASP.NET Core feature present in version 2.1, more specifically with Queued background tasks, and a question about parallel...

1

Solved

How to write to the database on a timer in the background. For example, check mail and add new letters to the database. In the example, I simplified the code just before writing to the database. T...

2

Solved

I am trying to build a small tcp server/daemon with asp.net core as a web frontend to interact with the server. I have found IHostedService/BackgroundService which seems to provide a low effort alt...

1

Solved

My .net core app needs to crawl data in a specified time interval. I have chosen to implement IHostedService to run it in parallel with API. The hosted service needs some services injected. I...

1

Solved

I'm looking at .Net-Core 2.1 new feature Hosted Services, I see that they are very similarly modelled to QueueBackgroundWorkItem The Queue Background work item seems to have a limitation that the ...

1

Solved

I have a QueueTask Hosted service (.NET Core's new background service) that I'd like to test. My queuedHosted service looks like so: public QueuedHostedService(IServiceProvider serviceProvider, IBa...

© 2022 - 2024 — McMap. All rights reserved.