M
Mark Rae
Hi,
I wrote a Windows service for a client a few months ago, and the client has
now asked me to modify it so that it shuts itself down under certain
circumstances e.g. a catastrophic failure of the network, SQL Server
connectivity problems etc.
I've tried to explain that this probably isn't a very good idea nor is it
even necessary because the service has sufficient error and exception
handling code to take account of such situations and take remedial action
accordingly, but my client is insistent, citing the fact that "lots of
Microsoft services shut themselves down sometimes..."
So I'm looking for some advice, please.
Firstly, do you agree with me that Windows services shutting themselves down
is bad practice? I've searched on Google to see if I can find anything to
back me up, but have drawn a bit of a blank so far.
Secondly, is it actually possible for a Windows service written in C# (v1.1)
to shut itself down?
Any assistance gratefully received.
Mark
I wrote a Windows service for a client a few months ago, and the client has
now asked me to modify it so that it shuts itself down under certain
circumstances e.g. a catastrophic failure of the network, SQL Server
connectivity problems etc.
I've tried to explain that this probably isn't a very good idea nor is it
even necessary because the service has sufficient error and exception
handling code to take account of such situations and take remedial action
accordingly, but my client is insistent, citing the fact that "lots of
Microsoft services shut themselves down sometimes..."
So I'm looking for some advice, please.
Firstly, do you agree with me that Windows services shutting themselves down
is bad practice? I've searched on Google to see if I can find anything to
back me up, but have drawn a bit of a blank so far.
Secondly, is it actually possible for a Windows service written in C# (v1.1)
to shut itself down?
Any assistance gratefully received.
Mark