I've written a Windows Service to send e-mails on events like OnStart,
OnStop, OnShutDown using System.Web.Mail . It works for everything but
OnShutdown. My guess is that for OnShutDown, once my send mail code is
executed, other necessary Windows Services have been terminated before
it can actually send the mail. I've updated my
HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices registry
DependOnService value including SMPTSVC and others. My hope is that the
services will shut-down in reverse order from start-up; I haven't had
any luck with this.
My Questions:
Do Windows Services (Windows 2000) shutdown in the reverse order from
which they start-up?
If so, any idea's as to which service I should include as a dependency?
If not, is there anyway I can ensure my Windows Service is
the first to shutdown?
Thanks,
~Bill
_______________ _________
Bill Sonia
Achaia Solutions, Inc
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
OnStop, OnShutDown using System.Web.Mail . It works for everything but
OnShutdown. My guess is that for OnShutDown, once my send mail code is
executed, other necessary Windows Services have been terminated before
it can actually send the mail. I've updated my
HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices registry
DependOnService value including SMPTSVC and others. My hope is that the
services will shut-down in reverse order from start-up; I haven't had
any luck with this.
My Questions:
Do Windows Services (Windows 2000) shutdown in the reverse order from
which they start-up?
If so, any idea's as to which service I should include as a dependency?
If not, is there anyway I can ensure my Windows Service is
the first to shutdown?
Thanks,
~Bill
_______________ _________
Bill Sonia
Achaia Solutions, Inc
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment