I have an app that launches a long update on the backend (Dynamics 365 in this case). I want to launch it in the background while the user can continue doing things.
The problem is that while this task is running, the other pages don't load when I click on them. Maybe is the usual behavior.
Tried with Task.Run() HostingEnvironment.QueueBackgroundWorkItem() and the result is the same.
This is how my controller looks like:
public ActionResult ConfirmCurrentMonthMeetings() {
//Task.Factory.StartNew(() => QueryHelper.MarkReadOnlyCurrentMonthMeetings(guide.Id, svc));
HostingEnvironment.QueueBackgroundWorkItem(clt => QueryHelper.MarkReadOnlyCurrentMonthMeetings(guide.Id, svc));
ViewBag.ConfirmingMeetingsMessage = "Meetings being confirmed on the background. This action might take a few minutes";
PrepareMainScreen();
return View("MainScreen");
}