J Jm Dec 11, 2004 #1 Hi All Is there a better way to stopping a vb service rather than just saying end in your code ?
G Guest Dec 11, 2004 #2 How about having a service controller in your code to call as stop on your service when needed? Rgds, Anand http://www.dotnetindia.com
How about having a service controller in your code to call as stop on your service when needed? Rgds, Anand http://www.dotnetindia.com
J Jim Dec 15, 2004 #3 Jm said: Hi All Is there a better way to stopping a vb service rather than just saying end in your code ? Click to expand... This works for me: Dim thisService as new ServiceController("insert name of this service as it appears in services list") thisService.Stop() Make sure you have any necessary cleanup code in OnStop()... Regards --Jim.
Jm said: Hi All Is there a better way to stopping a vb service rather than just saying end in your code ? Click to expand... This works for me: Dim thisService as new ServiceController("insert name of this service as it appears in services list") thisService.Stop() Make sure you have any necessary cleanup code in OnStop()... Regards --Jim.
G Guest Dec 30, 2004 #4 Jim, Can I call .Stop() from the OnStart of my service? I would think so but I would like some clarification... Thanks! Scott
Jim, Can I call .Stop() from the OnStart of my service? I would think so but I would like some clarification... Thanks! Scott