HighTechTalks DotNet Forums  

Indicating Windows Service Startup Failure

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Indicating Windows Service Startup Failure in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jon
 
Posts: n/a

Default Indicating Windows Service Startup Failure - 05-17-2004 , 03:36 AM






Hi ther

I've written a windows service that works OK, apart fom the fact that if it were to fail during startup, I'm not sure of the best way to handle it. If I let the exception fall thru' from my OnStart() method, the exception is reported in the event log and the service is not marked as started. But the exception message is messy and I want to catch it and report it cleanly if I can. If I catch it myself, report it then continue (without re-throwing), the service is marked as started, which isn't what I want

Is there any way I can catch the exception for reporting myself, then indicate to the SCM that it hasn't started, without relying on 'fall through' exceptions to inidictate this

Thank

Jon

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.