本文介绍了asp.net中的后台进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友


我需要使用Magento API将所有产品从本地数据库导入到Magento网站.我已经在我们的系统中实现了此功能.

我有以下要求.

1.当我点击提交按钮时,我想创建一个后台进程(线程),在该进程中执行上述操作.
2.那时该过程开始时,我将创建XML文件,以便用户可以查看操作状态.如未导入任何产品,或出现故障.
3.还希望保留中止"按钮,以便在单击中止"按钮时,进程将终止并停止执行剩余的进程.
4.处理完成后,再次写下XML文件以显示处理已完成.

我当时以为可以通过使用"ThreadPool.QueueUserWorkItem"来实现此目标,但是我无法确定要中止该进程.

谁能告诉我完成任务需要使用哪些功能?

谢谢
Imrankhan

Hi friends


I need to import all products from local database to Magento website using Magento API. I have already implemented this feature in our system.

I have following requirement.

1. When I click on submit button then I want to create one background process(Thread) where above operation execute in that process.
2. When this process start at that time I will create XML file so user can view operation status. Such as no of products are imported, or failed.
3. Also want to keep Abort button so when Abort button is clicked then process will be terminated and stop to execute remaining process.
4. When process is completed and write down XML file again to display process has been completed.

I was thinking that I can achieve this goal by using "ThreadPool.QueueUserWorkItem" but I can not identify the process to abort it.

Can anyone tell me which features I need to use to accomplish this task?

Thanks
Imrankhan

推荐答案


这篇关于asp.net中的后台进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 05:23