What is a reliable way to perform multi-tasking in ASP.NET MVC2

I need a reliable way to run 10 different tasks simultaneously. For example, the first will send emails, and the next will clear rows from a specific table ... so on.

I used the Thread class, and although it works well on my development machine (VS2010 internal web server), not one of these threads seems to work on my production server at all. And I do not know how to efficiently debug a problem on a production server.

I saw this method that prompts you to register cache objects. Since the application starts the callback when the cached item expires, then any code can be run to mimic the behavior of the threads. It seems a little Mickey Mouse.


I think my questions are the right way to endlessly run background tasks in ASP.NET MVC2 applications?

+3
source share
3 answers

I used quartz.net for this before, and it worked out pretty well.

+1
source

- ASP.net. Windows. ASP.net(MVC ) - .

+4

, . .

Implement your long-term tasks as a Windows service, send material messages to this service from your ASP.NET application using MSMQ,

+1
source

Source: https://habr.com/ru/post/1764846/


All Articles