473,322 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Initiating Threads on IIS Start Up

Hello,

We are trying to implement a solution for a project requirement for
which we need to have multiple services running to support offline
functionality such as the transmission of emails to subscribed users
and the publishing of content on specific schedules. In doing this we
would like to re-use a lot of the libraries we have already built for
the web application and, more specifically, re-use all of the
configuration files which have already been established for the web
application.

One solution for this is to spawn threads within the Application_Start
event of the web application which will run continously and handle the
offline tasks at their set schedules. This is probably the easiest
solution to implement, however the only problem is that these threads
will only be spawned when the first request is made to the web server.

Is there any other event trigger we could work off of that would be
executed when the web service restarts? Also, are there any
complications we should expect in going with this solution, or are
there any better solutions we should be looking into?

Thanks in advance.

John Fleming

Feb 28 '06 #1
2 1069

It sounds like you should write a windows service instead of a web
application.

John wrote:
Hello,

We are trying to implement a solution for a project requirement for
which we need to have multiple services running to support offline
functionality such as the transmission of emails to subscribed users
and the publishing of content on specific schedules. In doing this we
would like to re-use a lot of the libraries we have already built for
the web application and, more specifically, re-use all of the
configuration files which have already been established for the web
application.

One solution for this is to spawn threads within the Application_Start
event of the web application which will run continously and handle the
offline tasks at their set schedules. This is probably the easiest
solution to implement, however the only problem is that these threads
will only be spawned when the first request is made to the web server.

Is there any other event trigger we could work off of that would be
executed when the web service restarts? Also, are there any
complications we should expect in going with this solution, or are
there any better solutions we should be looking into?

Thanks in advance.

John Fleming

Feb 28 '06 #2
You could write a very simple "poll" service that periodically calls (pings)
a web service method.

"John" <jf********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Hello,

We are trying to implement a solution for a project requirement for
which we need to have multiple services running to support offline
functionality such as the transmission of emails to subscribed users
and the publishing of content on specific schedules. In doing this we
would like to re-use a lot of the libraries we have already built for
the web application and, more specifically, re-use all of the
configuration files which have already been established for the web
application.

One solution for this is to spawn threads within the Application_Start
event of the web application which will run continously and handle the
offline tasks at their set schedules. This is probably the easiest
solution to implement, however the only problem is that these threads
will only be spawned when the first request is made to the web server.

Is there any other event trigger we could work off of that would be
executed when the web service restarts? Also, are there any
complications we should expect in going with this solution, or are
there any better solutions we should be looking into?

Thanks in advance.

John Fleming

Feb 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Huzefa | last post by:
I am working on a amll project in Java that includes many classes. Each of the classes has a Logger object. I have associated a FileHandler with each of these Logger objects. The file is the same...
8
by: andrewpalumbo | last post by:
I'm trying to write some code which will split up a vector into two halves and run a method on the objects in the vector using two seperate threads. I was hoping to see a near linear speedup on an...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
3
by: EAI | last post by:
Hello All, How to abort or make sure the child threads are aborted before aborting the parent thread? Thanks
6
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C#. I am writing an application that communicates with a panel over ethernet, collects data and writes it to a file. The way the...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
4
by: MSDousti | last post by:
Hi I have written a VB .NET app, which uses several threads. I thought that when the user closes the main window (when MainForm.closed event occures, and I call application.exit) all running...
2
by: John | last post by:
Hello, We are trying to implement a solution for a project requirement for which we need to have multiple services running to support offline functionality such as the transmission of emails to...
2
by: jgbid | last post by:
Hi, I'm trying to build an IP Scanner inc c# for a specific port (80) and for specific IP Ranges. For example 24.36.148.1 to 24.36.148.255 My first step was to use TcpClient, but there are...
4
by: tdahsu | last post by:
All, I'd appreciate any help. I've got a list of files in a directory, and I'd like to iterate through that list and process each one. Rather than do that serially, I was thinking I should...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.