Canceling Windows Service Start
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
I've written a Windows Service using C#, but I cannot seem to figure out how
to cancel or prevent the service from starting under certain conditions.
For example, in the OnStart I read in some configuration settings, and if
anything is either empty, or invalid (such as a DB DataSource string or a
missing diredtory, etccc) I don't want the servie to start. So how would I
cancel the start up?
.
Relevant Pages
- Re: Canceling Windows Service Start
... > I've written a Windows Service using C#, but I cannot seem to figure out ... > DataSource string or a missing diredtory, etccc) I don't want the servie ... So how would I cancel the start up? ... Prev by Date: ... (microsoft.public.dotnet.languages.csharp) - Re: Notify a Service Process
... If you provide a Cancel button and trust the user to cancel only via this ... windows service and the service creates the report. ... My question is if a user cancels or closes the browser before the report ... report how do I notify the service to quit creating a report because there ... (microsoft.public.dotnet.framework.aspnet) - Windows Services
... I have Windows Service which is working fine, ... service under one condition I need to cancel the stop event. ... "Protected Overrides Sub OnStop() End Sub" procedure. ... Prev by Date: ... (microsoft.public.dotnet.general) - Removed a field from table - now form prompts for the field?
... The Control bound to this field has also been removed from the form. ... Now when I open the form, I get a prompt for the field. ... Cancel, it goes on to open the form. ... Prev by Date: ... (microsoft.public.access.forms) - Choose 2 of the 4 or 4 of the 8 answers
... were a partial mark? ... credit for only 1 answer or would they cancel each other out? ... Prev by Date: ... (microsoft.public.cert.exam.mcsd) |
|