I am currently running an ASP.NET MVC application on IIS with two main handlers, /DoWork (which takes about 10 minutes to complete) and /ReportStatus (which takes less than a second). The purpose of DoWork is to perform a task while ReportStatus provides updates on its progress.
My plan was to use asynchronous $.ajax requests in JavaScript to run /DoWork and monitor its progress by constantly querying /ReportStatus. However, I have encountered an issue where the long running $.ajax request on /DoWork seems to block all other queries on /ReportStatus until DoWork is completed.
How can I resolve this? Could this be related to server settings on IIS that limit active requests from one host? Any suggestions?
One solution I thought of is to have /DoWork execute the task in a background asynchronous thread and return immediately. But I am curious if there are better alternatives, especially since I want to maintain an open connection during the execution of /DoWork.