If we stop a windows service, when it is in middle of some process specified in System.Timers.Timer.Elapsed() event, would the service
a. stop the process abruptly or
b. complete the process and stop the service?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on what the service is designed to do. When you send a stop message to a service, the service gets a chance to do whatever it needs to do. This shows up as a call to your overridden ServiceMain.OnStop() in .NET. Some service may handle finishing of processing quickly. Other services might just kill child processes.