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. General Programming
  3. Windows Forms
  4. windows service :) [modified]

windows service :) [modified]

Scheduled Pinned Locked Moved Windows Forms
tutorialcomperformancequestion
2 Posts 2 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.
  • A Offline
    A Offline
    accessred
    wrote on last edited by
    #1

    i tried the following windows service application to send the email alerts automatically.. mean on a specific date and time. but when i am running this i am getting the msg:"The goodday service on local computer started and then stopped .Some services stop automatically if they have no work to do, for example, the performance logs and Alerts service" how to rectify it?? this s the application:http://www.codeproject.com/KB/cs/WIndows_Service.aspx[^]

    modified on Wednesday, January 02, 2008 11:17:19 AM

    D 1 Reply Last reply
    0
    • A accessred

      i tried the following windows service application to send the email alerts automatically.. mean on a specific date and time. but when i am running this i am getting the msg:"The goodday service on local computer started and then stopped .Some services stop automatically if they have no work to do, for example, the performance logs and Alerts service" how to rectify it?? this s the application:http://www.codeproject.com/KB/cs/WIndows_Service.aspx[^]

      modified on Wednesday, January 02, 2008 11:17:19 AM

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You put all of your code in the OnStart event of the service. OnStart is used to start a seperate thread where your service does all it's work. OnStart is expected to start this processing thread and return control back to the Service Control Manager inside of 30 seconds. Your code does all of it's processing, and I'm suspecting does a Thread.Sleep in there somewhere, in the OnStart method, never returning control back to the Service Control Manager.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      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