views:

34

answers:

3

I'd like to create Thread for do something in ASP.NET.

A: 

It's not really advisable.

If possible, it's generally better to run background processes in a Windows Service; that way you have significantly more control over them.

If that's not possible (and you should really try and make sure it is) then look into BackgroundWorker.

Noon Silk
A: 

I need to process some data in Session (All Users) every hour. Because I don't want to place this process in every request of user.

Rnan
A: 

Here's one option used (at least at some point) by Mr. Atwood himself: http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/

I think conventional wisdom is that a custom windows service (or even a scheduled task) is better for this sort of thing than trying to shoehorn it in to your web application, specifically if it's critical that your task run every time, on schedule.

Mike Powell
Thank you very much, That link is quite simple but It work. :)PS. My task still run very time as long as Application a live.
Rnan