ASP.NET长期的任务挂起其它页? [英] ASP.NET Long Task Hangs Other Pages?

查看:269
本文介绍了ASP.NET长期的任务挂起其它页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生成关于使用大成preadSheetGear工具飞报告。起初事情是伟大的,因为报告是简单而小于1秒中完成的。现在我在更复杂的报告,他们正在约30秒至1分钟。这不是一个问题,我们只是被我们扔了一个活动图像,让用户等待,挺好的。

I'm generating reports on the fly using the great SpreadSheetGear tool. At first things were great because the reports were simple and done in under 1 second. Now I'm at more complex reports and they are taking about 30 seconds up to 1 minute. This isn't a problem, we just throw up an activity image and let the user wait, fine by us.

我发现的问题是当两个用户来到现场。

The problem I've found is when two users come to the site.


  1. 用户1进入网站

  2. 用户1运行报告称,需要30秒。

  3. 2的用户来网站

  4. 用户2等待,直到用户1报告完成后,页面加载。

直到把它完成对用户1运行报告挂断站点。这是怎么回事,我该如何解决这个问题?

The report running for User 1 hangs up the site until it's done. What is going on and how can I fix this?

推荐答案

您不同意在什么code看起来像任何细节,但它听起来像你应该考虑制作的异步页的。总之,关键是要关闭线程的线程池,这是用来服务页面请求移动繁重的工作。通过将繁重的工作给其他线程,线程池中的线程可以迅速以服务于其他传入请求返回到池中。

You don't share any details on what the code looks like, but it sounds like you should look into making asynchronous pages. In short the trick is to move heavy work off the threads from the thread pool, which is used to serve page requests. By moving the heavy work to other threads, the thread pool thread can be returned to the pool quickly in order to serve other incoming requests.

然后,它更像是一个物质的生成报告的机器能有多少工作需要。

Then it's more a matter of how much work the machine producing the reports can take.

这篇关于ASP.NET长期的任务挂起其它页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆