如何实现多线程asp.net? [英] How to implement multi threading asp.net?
本文介绍了如何实现多线程asp.net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我有群发邮件功能。群发邮件由大约千个邮件组成,我已经使用for循环实现了群发邮件。这意味着邮件是逐个发送的。发送1000封邮件需要大约5分钟,直到完成发送邮件我的申请暂停我无法执行任何其他功能。任何人都可以建议使用线程的简单解决方案,以便邮件在后台发送,我可以在同一时间执行其他操作。
In my application I have the mass mailing functionality. The mass mail consist of around thousand mailids and I have implemented the mass mailing using a for loop.It means that mails are sent one by one.It takes around 5 minutes to send 1000 mails and till it finish sending those mail my application is halted and I cant perform any other functionality. Can anyone suggest a simple solution using threading so that the mails are sent in the background and I can perform other actions in the mean time.
推荐答案
我googledasp。 net发送电子邮件后台主题这里有一些结果
如何使用后台线程在ASP.Net中异步发送电子邮件 [ ^ ]
http:// www .advancesharp.com / blog / 1107 / send-email-in-background-thread-in-c-aps-net [ ^ ]
如何使用线程或异步在ASP.NET中发送批量邮件 [ ^ ]
如果你自己谷歌,你会发现更多,如果没有你喜欢的。
I googled "asp.net send email background thread" and here are some results
How to send email Asynchronously in ASP.Net using Background Thread[^]
http://www.advancesharp.com/blog/1107/send-email-in-background-thread-in-c-aps-net[^]
How to use Threading or Async to send Bulk Mail in ASP.NET[^]
If you google yourself you'll find many more if none of those take your fancy.
这篇关于如何实现多线程asp.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文