You do NOT want to use IIS / ASP.Net to start a long process, it is not intended for this.
Use it only for the initial call to Web.API, to start the service using MSMQ or to insert a row into a table that tells your individual process what to do.
Create a separate application - or a console application, where you will use the Windows scheduler to periodically launch the application and check for new work items; or a Windows service that periodically checks your work item store for work items. Then you can use ThreadPool, etc. To start your process asynchronously.
source
share