I\'ve been trying to create a controller in my project for delivering what could turn out to be quite complex reports. As a result they can take a relatively long time and a
If you have an access to your web server machine as a choice you can create windows service or simple console application to perform long running work. Your web app should add a record to db to indicate that operation should start, and your windows service which periodicaly checks for new records in db should start performing task and report progress to db. Your web app can use ajax request to check for progress and show to users.
I used this method to implement excel reports for asp.net mvc application. This report was created by windows service which runs on machine and constantly checks for new records in reports table and when it finds a new record it starts to create a report and indicate a progress by updating record field. Asp.net mvc application just has been adding new report record and tracking progress in database untill it finished and then provided a link to ready file to be downloaded.