Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Background Processing/Thread in ASP.NET App, how to keep them running?

Background Processing/Thread in ASP.NET App, how to keep them running?

Scheduled Pinned Locked Moved ASP.NET
helpquestioncsharpasp-netdatabase
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dominic Pettifer
    wrote on last edited by
    #1

    Does anyone have any advice regarding running a background processes or threads in an ASP.NET application. I know it's possible to kick off a background process by responding to Application_Start events in the Global.asax file and using some sort of singleton class. I basically want a task scheduller that kicks off at a certain time without any user intervention and sends emails, or writes to a database etc. The main issue I have is how to keep it running because the ASP.NET AppDomain can get reset or shutdown for a number of reasons, such as when there's no user activity. So my main question is how could I keep it running? I read somewhere someone suggesting getting the background process to do an HttpWebRequest it's own website, thus keeping the AppDomain running, would this work do you think? Also I know about running a Windows Service, but since I'm on shared hosting this isn't an option. Many thanks for your help! :)

    Dominic Pettifer Blog: www.dominicpettifer.co.uk

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups