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_Sta rt
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 2 1081
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_Sta rt 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
You could write a very simple "poll" service that periodically calls (pings)
a web service method.
"John" <jf********@gma il.com> wrote in message
news:11******** **************@ j33g2000cwa.goo glegroups.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_Sta rt 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 for each of these
classes "log.xml" Now I want all the classes to log to the same file.
However, this
does not happen. Each class creates its own log file. The base class
uses the file "log.xml". Each subsequent class creates a log file...
|
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 SMP machine,
but I'm finding that the code below takes almost exactly the same
amount of time as when I iterate through the vector, and don't use any
threads at all (using only one processor). I'm running this on a Dual
Athlon machine under...
|
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 as 2300 ms to complete.
This is fairly rare, but the test code below will definitely show it.
Somehow, I must not have my design right.
The idea of this code is that I do two different types of processing (
1-starting and 2-ending) based on...
|
by: EAI |
last post by:
Hello All,
How to abort or make sure the child threads are aborted before aborting the
parent thread?
Thanks
|
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 data is
collected is that we have different schedules (so one set of data is
collected say every second, another set of data might be collected
every 30 seconds, and so on).
| |
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 ThreadPool thread.
And that is exactly what MS VIsual Studio shows.
But when I run Processexplorer or Taskmanager I see 2 additional
threads, after a while another 2 additional threads. With the 3 threads
at start time we have totally 7 threads.
|
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 threads must abort,
but to my great surprise, running threads do not stop when
application.exit is called. So I (or the users) have to stop threads
using Ctrl-Alt-Del.
Is there a way to stop ALL threads with a single instruction, without
having to...
|
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 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...
|
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 nothing to control
Timeout Connection... and I wasn't interested to wait 25-30sec for each
ip.
After some search, it's look like Socket was the solution with
|
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 start five threads and
process five files at a time.
Is this a good idea? I picked the number five at random... I was
thinking that I might check the number of processors and start a
multiple of that, but then I remembered KISS and it seemed that...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |