timberbt
asked on
.Net windows service how to stop itself?
I'm making my first windows service and I'm going back and doing some error coding where I want the service to actually stop itself.
I don't see any real methods for closing the service. I don't see any .close() or unload or anything like.
Could someone help me out here for how to let this guy stop gracefully? thanks.
=Timberbt
I don't see any real methods for closing the service. I don't see any .close() or unload or anything like.
Could someone help me out here for how to let this guy stop gracefully? thanks.
=Timberbt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Question was not really settle, so closing as unanswered is OK.
hi timberbt,
Thanks for returning to this old thread. I disagree with your assessment. Did you read the information at Sector's links? There is excellent information there, including info about the System.ServiceProcess.Serv iceControl ler class that answers your question completely.
Are you certain that you do not want to give Sector any credit?
Thanks for returning to this old thread. I disagree with your assessment. Did you read the information at Sector's links? There is excellent information there, including info about the System.ServiceProcess.Serv
Are you certain that you do not want to give Sector any credit?
Half points refunded. Accepting Sector's answer.
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept Sector's comment(s) as an answer.
timberbt, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer