B
Bill Sonia
I'm 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
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_MACHINE\SYSTEM\CurrentControlSet\Services
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
like OnStart, OnStop, OnShutDown using System.Web.Mail.
It works for everything but OnShutdown. My guess is that
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_MACHINE\SYSTEM\CurrentControlSet\Services
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