473,382 Members | 1,717 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,382 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 1097

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...
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...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.