Need an ASP.NET MVC long running process with user feedback

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-05-28T07:24:08Z Indexed on 2010/05/28 10:22 UTC
Read the original article Hit count: 390

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 progress bar would certainly help users to know that things are progressing. The report will be kicked off via an AJAX request, with the idea being that periodic JSON requests will get the status and update the progress bar.

I've been experimenting with the AsyncController as that seems to be a nice way of running long processes without tying up resources, but it doesn't appear to give me any way of checking on the progress (and seems to block further JSON requests and I haven't discovered why yet). After that I've tried resorting to storing progress in a static variable on the controller and reading the status from that - but to be honest that all seems a bit hacky!

All suggestions gratefully accepted!

© Stack Overflow or respective owner

Related posts about c#

Related posts about jQuery