?
Solved

Starting a New Thread when IIS starts

Posted on 2007-11-20
3
Medium Priority
?
190 Views
Last Modified: 2008-02-15
I have a requirement for my web application to start a new thread to process daily emails.   This thread should start when IIIS starts so that no one actually has to open a web page for it to work.  Is this possible?    Can the new thread launch when IIS starts up?

p.s.
[ I know that I can schedule a stored procedure to run through SQL Server or run a separate app in task scheduler but the requirements for this project are to keep all the logic in the one single web application)
0
Comment
Question by:phunchak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 20325844
Sorry but no.  Web sites are stateless and IIS simply sits waiting to fulfill requests for web pages.  Code is only executed when a user requests a page.

By process emails do you mean receive or send?
0
 
LVL 2

Accepted Solution

by:
phunchak earned 0 total points
ID: 20331896
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 20331921
I had thought about using the Application_Start and _End functions but the warning the URL display pretty much describes the issue.

I built a currency trading application that had to poll providers for values and I found that I couldn't trust those events, however, you are more than welcome to try.  For your purposes it might work.

Cheers
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question