Solved

Starting a New Thread when IIS starts

Posted on 2007-11-20
3
178 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now