This is not a direct answer to your question, but a proposal to use a separate WCF service for lengthy work tasks. Your web server is really busy working on a long task, and I assume that I use a lot of CPU.
Expected Issues
- Overall web server performance will decrease
- You cannot scale such a solution
Alternatively, consider including long logic in the WCF service. You can run and check the status of a job by issuing a simple AJAX request with the job ID. Each task can be launched in a separate thread, and the result / status is stored in a reliable storage.
oleksii
source share