Error message when service fails to start

C

Christof Nordiek

Hi,

the Service I wrote in C# may fail to start for some reason. I can report
that failure to the SMC resp. to the net start command by setting ExitCode
to a non zero value and then throw an Exception.

The problem is that it either reports a predefined message or simply the
number with no text meaningfull to the user. Is there anyway I can set the
error message reported?

Atleast it should be a message like : "Look in the Event-Log for further
information".

thx
Christof
 
G

Guest

When you throw the exception, write a custom message to the event log just
before doing so.
Alternatively, if you've wired in an unhandled exception event handler, you
ca also do it there.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top