windows service :) [modified]
-
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
-
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
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