Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6897643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:11:42+00:00 2026-05-27T07:11:42+00:00

I am creating an Intranet webpage for my office. The application needs to download

  • 0

I am creating an Intranet webpage for my office.

The application needs to download SMTP email every 5 minutes. (As well as some other house keeping things)

I have just created a ASP.NET webpage that is running on IIS through Windows 2008 R2 server.

Do I have to create a seperate Windows Service to do this? So I would just have 2 programs, the webpage and the windows service?

or is there a better way to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:11:42+00:00Added an answer on May 27, 2026 at 7:11 am

    The idea

    The simplest way to do recurring stuffs on an asp.net web site is

    • During the application start, create an instance of System.Timers.Timer object and keep it reference on a static field in your code (to prevent garbage collection)
    • Make it to AutoReset and give it the interval you want (5min)
    • Listen to the Elapsed event and put your recurring tasks there

    The code

    public class Global : System.Web.HttpApplication
    {
        private static Timer timer;
    
        protected void Application_Start(object sender, EventArgs e)
        {
            timer = new Timer(5 * 60 * 1000);
            timer.AutoReset = true;
            timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
        }
    
        void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            //Get our emails here
        }
    }
    

    About the app pool recycle

    It does not matter:

    • If your site have traffic, then the app pool will stay up
    • If there are timespans where there is no traffic, the app pool may be stop but you don’t care because there are no users to complain about that 🙂

    If it’s really important, know that by default, an app pool is configured to recycle just once a day and to not stop even if there are no traffic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an intranet asp.net mvc application that everyone in the company should have
What if I am creating an intranet web application using MVC and in the
I am currently creating a web application that will be deployed in an intranet
I'm creating a FORM with PHP for an intranet webpage. Another PHP script is
I'm creating an intranet web-application in an IE shop and I'm looking to retrieve
Creating an application that requires BOTH gesture(swipe) support as well as simple touch events.
I am creating an intranet application in php that is running on a client's
I am creating an MVC Intranet app with windows authentication. The data being accessed
I'm creating a little photo sharing site for our home's intranet, and I have
I'm looking at creating a simple URL shortening service for our corporate intranet, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.