Veeru
Veeru

Reputation: 463

How to implement Windows service kind of infrastructure in ASP.NET

I have limitations to host Windows Services in my web hosting provider. But i need run small task frequently.

Do we have any other framework/api which provides similar infrastructure like "Windows Services" from ASP.NET?

Upvotes: 1

Views: 199

Answers (4)

Brian Ball
Brian Ball

Reputation: 12596

If you are using ASP.NET 4, you can have your app pool always running, then have a timer going, and whenever that time elapses, run your process:

http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

Upvotes: 1

Stilgar
Stilgar

Reputation: 23551

You can start a thread using the Application Start event in the Global.asax to do the scheduled job. It is not as robust solution as a Windows Service but it is good enough in most cases.

Upvotes: 0

KBBWrite
KBBWrite

Reputation: 4409

I think it will better if you can use FireDaemon. If you can create a console application, then the filedemon will be able to run it frequently similar to Windows service.

http://www.firedaemon.com/

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038780

You may take a look at Quartz.NET

Upvotes: 2

Related Questions