Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Is it possible to start multiple instances of a Thread or BackgroundWorker from a Blazor program, and start them inside .NET Aspire?

$
0
0

I want to run a worker (as Thread or BackgroundWorker) multiple times inside a .NET Aspire AppHost project, which is started from a Blazor Website.

I have the Projects (AppHost [Aspire], Web [Blazor], Worker [dll]).

Since I'm new to Aspire I don't know if this is even possible or how to do it.

I tried using the aspire builder.Services.AddHostedServices(); which did not work due to the namespace not being found because of the using Projects; which is needed for the blazor project as far as I understand.

I also tried registering it as a project which kinda worked.. well at least it started event if only once and only at the boot without any control over it via the web project.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>