When a thread is created as a task on projects written in asp.net webform or .Net Core Web and is added to a server, it stops running after a while without a reason or exception.
Task.Factory.StartNew(async () =>
{
//...
}, _cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
I need to use a task as endless scheduling; how can I do it on projects written in asp.net webform or .Net Core Web?
The problem is only for web projects, for example in console projects it works properly.