Running an App in the background

Discussion in 'ASP .Net' started by Toby, Dec 23, 2003.

  1. Toby

    Toby Guest

    How do i create an ASP.NET application which executes in
    the background regardless of who is connected to the web
    server? For instance, i want to send an email out to a
    list of users based on a timer. Thnx
     
    Toby, Dec 23, 2003
    #1
    1. Advertising

  2. It all depends on your situation. The most efficient way to do what you're
    describing would be to not write an ASP.Net app to do it, but a Service. The
    reason? ASP.Net is a technology designed to work within the HTTP environment
    of a web server, and has all the overhead necessary to do so. However, the
    requirement you've defined has nothing to do with HTTP, Request and
    Response, or HTML. It is an app that periodically sends email. The Service
    model perfectly fits the description.

    If, however, for some reason you don't have the means to write a Service to
    do this, it couold be done by instantiating a class in the ASP.Net
    Application cache which would carry this out. It could be created in the
    Application_Start Event Handler of the Global.asax. The only possible
    problem would arise if there was a significant time gap in Requests coming
    to the web server, in which case the Application would die, and of course,
    the class with it. The class would be re-instantiated with the first
    Request, and continue to operate on the timer. However, for the duration of
    the time during which there were no requests, there would be no emails sent.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Toby" <> wrote in message
    news:003401c3c971$e3aa92c0$...
    > How do i create an ASP.NET application which executes in
    > the background regardless of who is connected to the web
    > server? For instance, i want to send an email out to a
    > list of users based on a timer. Thnx
     
    Kevin Spencer, Dec 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathias Dahl
    Replies:
    1
    Views:
    333
    Mike Meyer
    Aug 16, 2005
  2. Mathias Dahl
    Replies:
    1
    Views:
    419
  3. mason66
    Replies:
    0
    Views:
    426
    mason66
    Jul 27, 2006
  4. JWL
    Replies:
    4
    Views:
    591
    Michael Winter
    Sep 26, 2006
  5. Replies:
    3
    Views:
    519
    Daniel Pitts
    Jan 3, 2007
Loading...

Share This Page