本文介绍了处理长ASP.NET运行过程中常用的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个长期运行的数据传输过程,这只是被称为并运行一个asp.net页面。它可能需要长达几个小时才能完成。它似乎工作的所有权利,但我只是想知道什么是一些比较流行的方式来处理一个漫长的过程是这样的。你创建一个应用程序,并通过Windows调度运行,或者Web服务或自定义处理程序?

We have a long running data transfer process that is just an asp.net page that is called and run. It can take up to a couple hours to complete. It seems to work all right but I was just wondering what are some of the more popular ways to handle a long process like this. Do you create an application and run it through windows scheduler, or a web service or custom handler?

推荐答案

在对Web的应用程序长时间运行的任务的项目,我犯了一个窗口服务。
每当用户需要做的耗时的任务时,IIS将给任务,这将返回一个标记(为任务的临时名称)的服务,并在后台服务会做的任务。在任何时候,用户将看到他/她的任务的状态,这将是排队,处理或完成任何悬而未决。该服务会做的并行作业的固定数量,并会保持队列中下一个进来的任务。

In a project for long running tasks in web-application, i made a windows service.whenever the user has to do the time-consuming task, the IIS would give the task to the service which will return a token(a temporary name for the task) and in the background the service would do the task. At anytime, the user would see the status of his/her task which would be either pending in queue, processing, or completed. The service would do a fixed number of jobs in parallel, and would keep a queue for the next-incoming tasks.

这篇关于处理长ASP.NET运行过程中常用的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 15:29