ASP.NET MVC应用程序中的长时间运行方法

时间:2016-09-28 07:15:05

标签: c# jquery asp.net-mvc asp.net-mvc-4

我在表单提交中有一个ASP.NET MVC Web应用程序,

1. I have a long running 2 methods(each method process approx 15 min)

2. First method returns a boolean.

3. Second method return class object.

使用这些类对象将处理数据库条目。

我的问题是,

1. How to acheive this without making UI hangs for longer duration?

2. Since there will be numerous form submit, 
can thread concept be handy by making it as background thread? 
or anything else like backgroundworker, async/await, windows service with queues like msmq or rabbitmq or someother new concepts?

3. If any, can you explain to achieve it?

4. Last question is, I need to display a progress bar(in jquery) during long running methods,
    On first method return i should send a status like first method completed.
    On second method return i should send a status like second method completed.

5. How could i pass those method return value to jquery?

如果有任何答案将不胜感激。

-Prasanth

0 个答案:

没有答案