views:

715

answers:

3

I want to develop an Online Reminder service in ASP.NET 2.0 (C#) and SQL2005. But I am not getting the concept of reminder service. What I know is using an online reminder service I can schedule a reminder for future dates, which is sent to me (who schedule reminder) via email or SMS on that date. But in asp.net how to do this, caz anyone can schedule a reminder for any date, how we'll know that when to send that mail to the person. We have to put some loop or what.

So please guide me, what is the concept of an online reminder service and how I can easily develop this application using ASP.NET and SQL

Edited

I am on Shared hosting server, so that solution must be able to work on shared hosting.

Or

Please tell me if anyone knows about any FREE and open-source reminder service CMS which I can download and study it.

+1  A: 

Most of the time this is a two piece application, the front end UI for entering a reminder and a service that checks scheduled events and actually sends out notifications.

ASP.NET applications are per request basis so you generally wouldn't keep a long running process doing background work from the application itself. It might do you well to look up some examples of scheduling web applications so you can get a feel of what is generally occurring.

Edit:
I have no recommendations if the application has to be a standalone web application on shared hosting. I would not recommend that setup to accomplish your goal.

Quintin Robinson
+1  A: 

You would likely want some sort of back-end process to look for items that need a reminder sent. This could be a background thread in the ASP.Net worker process (started in Application_Start in global.asx) but would more likely be a windows service running in the background. It could run on the same server as the web app (likely on smaller systems) or on its own dedicated machine.

Either way it's not as trivial a process as you might expect as there's a balancing act to be played between the frequency of your checks and the lag-time of the reminder.

Oh, and why ASP.Net 2.0, when 3.5 is "current"?

WaldenL
I have to develop this application on urgent basis, till 30th March and that's why can't move to ASP.NET 3.5 will upgrade this in future...
Prashant
+1  A: 

Yes, the key thing you need is a scheduler of some kind - usually you would use one of:

  • Windows Service on the server
  • SQL Job
  • CRON or AT job schedualed on the server

Any one of those could be set up to call a page on your site that would kick off this process.

As you are in a shared environment, you're not likely to have access to any of those, and so would need to have some other process in place.

What you could do is have remote (to the server) schedualer calling a page on your website that performs the lookup and sends the emails - this could either be something running on your dev/office environment (with all the attendant dangers of power/network failures, etc), or you could look at getting a "site monitoring" service that will ping a page on your server at regular intervals to check to see if it's up and running.

The page it hits would then:

  1. Check a flag to see if today's alerts had been sent.
  2. Update the flag to say the send is in progress.
  3. Search for today's alerts.
  4. Send today's alerts.
  5. Update the flag to say that the alerts have been sent.

We basically have a SQL Job that calls a page like this on our webserver to send out daily alerts, and it usually works quite well.

There's no reason why the page couldn't be called by a remote server to start this process.

Various options are available for this sort of thing:

Are just a couple, I'm sure that there are plenty more.

Zhaph - Ben Duguid