ASP.NET & Remoting.

  • Thread starter Thread starter Jignesh
  • Start date Start date
J

Jignesh

Situtation:
I want to send mails from the site on regular basis may be weekly/daily to all subscribed users. This activity should be automated/sheduled.

My Thinking: Possible solution can be that i shall use Remoting. SingleTon. to solve this. this is what i am planning to do.
Step #1
I shall create a remoting class. In the constructor of the class i will start a thread which will be in an infinite loop. I will ask the thread to sleep for 1 hr. After 1 hr. the thread will connect to database , search any pending emails for the day and sends the mail and again goes back to sleep for 1hr.

Step #2
I shall create a virtual directory and host the remoting class there.

Step#3. From the main site in the application onstart event i will call the constructor in an Async way.

What i am thinking is
Right ?
Logical ?
Possible ?

Awaiting for a feedback
Regards,
 
We did the same thing over here. However, we took an easier approach.

We wrote a formless c# windows app (not a console app) to handle the calls to the db, creation of email, logging and notification. Then we added a DTS package to SQL Server to run the executable. Using SQL Servers scheduler, we can schedule to the package (executable) to run at just about any interval we choose.

David Young
Situtation:
I want to send mails from the site on regular basis may be weekly/daily to all subscribed users. This activity should be automated/sheduled.

My Thinking: Possible solution can be that i shall use Remoting. SingleTon. to solve this. this is what i am planning to do.
Step #1
I shall create a remoting class. In the constructor of the class i will start a thread which will be in an infinite loop. I will ask the thread to sleep for 1 hr. After 1 hr. the thread will connect to database , search any pending emails for the day and sends the mail and again goes back to sleep for 1hr.

Step #2
I shall create a virtual directory and host the remoting class there.

Step#3. From the main site in the application onstart event i will call the constructor in an Async way.

What i am thinking is
Right ?
Logical ?
Possible ?

Awaiting for a feedback
Regards,
 
Back
Top