开发者

How to make a Web (WCF) Service act as Windows Service

The question, I have a web application - .net 4. The client is having a requirement that he want to send email to his users on a regular basis about his new courses etc.

The webapplication created will hosted on a "Shared hosting environment" with no excess to windows services - file system other than the web root folder through FTP.

The PROBLEM is that ...

Due to shared hosting i cannot create a windows service for him which will check the database - if there are any scheduled mail to send every 5 min.

So my question is - Is there anyway i can run a wcf web service or any other web based service or page or handler which can keep running and automatically checks the database for any new scheduled mails - if yes start sending it automatically in开发者_Python百科 an different thread.

Any different suggestion or answers are also very much welcomed. Thanks SO Experts.


Create a webmethod in WCF that needs to be called, and that can be reached through a url, for example:

http://www.example.org/checkandsend/email/

Add a new scheduled task on your own PC, that calls that URL every five minutes. Voila.


Rick Strahl: Forcing an ASP.NET Application to 'stay alive'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜