线程中止异常 [英] Thread abort Exception

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

问题描述

大家好,

我在驻留在mono中的webservice中遇到问题.
我有一个处理大型数据库操作的Web服务.我在"appSettings"标签下的"webconfig"文件中给出了"Timeout = 1024".

2分钟后对Web服务的调用完成后,我收到线程异常中止".

请帮助我克服这个问题

问候
Kumaran

Hi everbody,

I am having an issue in webservice which resides in mono.
I am having a webservice which process huge database operation. I have given "Timeout = 1024" in the "webconfig" file under "appSettings" tag.

When call is done to the webservice after 2 minuter i am getting "thread abort exception".

please help me to overcome this problem

regards
Kumaran

推荐答案

如果您尝试进行大型数据库操作,则通常不是Web服务的最佳选择.您可能要考虑将一条消息放在消息队列上,并让一个单独的进程实际执行db操作.或者,您可以使用单独的Windows服务来运行该操作,并且您的网站可以定期轮询该服务(或数据库)以查看该操作的完成状态.这使您可以开始操作,然后导航到另一页面;然后再回来检查进展情况.
If you are attempting huge database operations, then a web service is usually not the best place to do this. You may want to consider putting a message on the message queue and having a separate process actually perform the db operation. Alternatively, you could use a separate windows service to run the operation, and your web site could periodically poll the service (or the database) to see the completion status of the operation. This allows you to kick an operation off, and then navigate to another page; before coming back to check on how it''s progressing.


这篇关于线程中止异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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