views:

76

answers:

2

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 an different thread.

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

+1  A: 

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.

Jan Jongboom
There must be a better way. MSMQ maybe?
RPM1984
You cannot reach any windows service, so now MSMQ either.
Jan Jongboom
thanks for the reply. I agree to you idea. Well if possible can you give an example of how to call URL from scheduled task. It does not have a specific option for pinging a URL. Need to make any script file or batch for that ????
J Sinh
+1  A: 

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

Dirk
nice article. would go for this option if Jan Jongboom's idea will not be approved by client. thanks anyways.
J Sinh