Initiating Threads on IIS Start Up

Discussion in 'ASP .Net' started by John, Feb 28, 2006.

  1. John

    John Guest

    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_Start
    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
     
    John, Feb 28, 2006
    #1
    1. Advertising

  2. John

    John Bailo Guest

    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_Start
    > 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
    >
     
    John Bailo, Feb 28, 2006
    #2
    1. Advertising

  3. You could write a very simple "poll" service that periodically calls (pings)
    a web service method.

    "John" <> wrote in message
    news:...
    > 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_Start
    > 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
    >
     
    Mark Newmister, Feb 28, 2006
    #3
    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. Jay
    Replies:
    8
    Views:
    6,687
    livshitz
    Jun 12, 2011
  2. Pavils Jurjans

    ASP page initiating complex code execution

    Pavils Jurjans, Feb 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    375
    Tommy
    Feb 3, 2004
  3. Replies:
    1
    Views:
    369
    souri challa
    Jul 8, 2005
  4. Replies:
    2
    Views:
    373
  5. Tim Fooy
    Replies:
    3
    Views:
    1,899
    Tim Fooy
    Aug 13, 2004
Loading...

Share This Page