线程中止异常

编程入门 行业动态 更新时间:2024-10-28 00:18:36
本文介绍了线程中止异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我在驻留在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.

更多推荐

线程中止异常

本文发布于:2023-11-14 05:02:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586293.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:线程   异常

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!