Re: C# service, performs lots of things on start, windows doesnt give it enough time!
- From: "Jani Järvinen [MVP]" <janij@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Aug 2007 19:42:34 +0300
Hi Craig,
you've got many other responses already, but I suggest that you take a look
at the ServiceBase class' method RequestAdditionalTime.
This method is:
"...intended to be called by the overridden OnContinue, OnPause, OnStart, or
OnStop methods to request additional time for a pending operation, to
prevent the Service Control Manager (SCM) from marking the service as not
responding. If the pending operation is not a continue, pause, start, or
stop, an InvalidOperationException is thrown".
This was from the MSDN documentation. This method might solve your issues,
if you call it in the OnStart event handler.
Hope this helps!
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland
janij@xxxxxxxxxxxxxxxxxxxxxx
http://www.saunalahti.fi/janij/
.
- References:
- Prev by Date: Re: Threading and DllImport
- Next by Date: Re: Simulate Thread.Join
- Previous by thread: Re: C# service, performs lots of things on start, windows doesnt give it enough time!
- Next by thread: Re: Income reports omit dividends
- Index(es):