一个长过程的问题 [英] problem with a long process

查看:90
本文介绍了一个长过程的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况是这样的:

创建了一个页面,该页面将运行很长时间. ...此过程包括:
-读取文件. CSV,将为文件的每一行创建一个发票...在此过程结束时,将显示一条成功消息.

为此,决定使用一个updatepanel,以便该进程是异步的,并且可以在等待完成该进程的同时显示UpdateProgress ...为此,在scriptmanagment的属性中添加了AsyncPostBackTimeout = 7200(2小时),并且超时是与qa和生产服务器中一样,应用程序的web.config中的数量增加了.

测试是在本地主机上作为qa服务器进行的,并且运行良好,在生产服务器上测试功能时会出现问题.

使得:
加载文件并启动进程...在此期间,运行UpdateProgress,但仅​​花费1或2分钟,并且在不显示最后一条消息的情况下结束执行,就好像截断了进程.查看创建的发票时,仅创建文件的前10条记录.(来自具有50,100 o +行的文件)

所以我想为我提供帮助,因为我不知道出什么问题.

My situation is this:

was created a page that will run a long process . ... This process consists in:
- Read a file. Csv, for each row of the file wil be created an invoice...in the end of this process shows a successful message.

for this it was decided to use an updatepanel so that the process is asynchronous and can display an UpdateProgress while waiting to finish the process ... for this in the property of scriptmanagment was added the AsyncPostBackTimeout = 7200 (2 hours) and also timeout was increased in the web.config of the app as in qa and production servers.

Tests were made in the localhost as a qa server and works very well, the problem arises when testing the functionality on the production server.

that makes:
file is loaded and starts the process ... during this period is running the UpdateProgress but is only taking between 1 or 2 min and ends the execution without displaying the last message, as if truncated the process. When reviewing the invoices created are creating only the top 10 records of the file.(from a file with 50,100 o + rows)

so I would like to help me with this, because i don''t know what could be wrong.

推荐答案

您应该创建一个可以调用以执行的服务这些冗长的任务,因此它们不会在ASP.NET页面生命周期中受到阻碍.
You should create a service that you can call to perform these long tasks, so they are not held up by the ASP.NET page lifecycle.


这篇关于一个长过程的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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