RE: Windows Service - Error 1053

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Richard Steele (RichardSteele_at_discussions.microsoft.com)
Date: 12/07/04


Date: Tue, 7 Dec 2004 05:01:01 -0800

So far i have developed the following method

Create your WinApp as normal (look out for further replies from knowledgable
people re: System.ServiceProcess, re my question) you have to then setup a
windows service installer look at the following
http://www.c-sharpcorner.com/Code/2003/Oct/DynamicServiceInCSharp.asp to
create the service (I have used this to develop a standalone app that will
install any service)
Use installUtil (look in dotnet framework SDK) to install the service
installer and make sure the imagepath points at your executable -

When you have setup the service make sure that the app can interact with the
windows desktop (right click the service in service manager). So far that is
where i am. The app starts then closes after a timeout - this is where i am
stuck

Hope that helps, if you get further than me, let me know]

Richard

"W AKthar" wrote:

> Hi Richard,
>
> This not an anser to your question but more of a help
> question.
> I too have tried to create a WinForm windows service biut
> have not be able to. Can you please tell me how to do
> this??
>
>
> >-----Original Message-----
> >I have created a WinForm application that needs to be
> run as a windows
> >service (the PC is inaccesible by any user) i have
> successfully installed the
> >application as a windows service. When i start the
> service, i get the
> >following error
> >
> >Error 1053: The service did not respond to the start or
> control request in a
> >timely fashion
> >1. Is there anyway to extend the timeout period.? I use
> timed threads to
> >load a serial device driver and this takes time
> >
> >2. To enable the service to act correctly i assume that
> the application must
> >have OnStart and Stop methods. As the Winforms app
> already inherits
> >Windows.Forms.Form, how do i also make it inherit
> >System.ServiceProcess.ServiceBase so I can correctly
> start and stop (there
> >are cleanup operations on close)
> >
> >Thank you for your help in this matter
> >
> >..Net Framework v 1.1.4322.573
> >.
> >
>



Relevant Pages

  • Using functions between projects
    ... I have three projects (one in the installer ... One is a Windows Forms based app and ... the other is a Windows Service. ... Anil Gupte ...
    (microsoft.public.dotnet.languages.vb)
  • WinForm Running as Win32 Service?
    ... I ahve a .NET 3.5 WinForm that hosts a WCF/WF service. ... I would now like to have the app run as a Windows Service. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Windows distribution suggestions?
    ... > a Python app for use under Windows XP. ... Launching app.exe should completely install Python, ... Since your installer needs to run before Python is installed, ...
    (comp.lang.python)
  • Re: Windows service interaction with WinForms app?
    ... | That's the question raised in a previous post [Make a Windows Service ... | and the schedule of the service), then a privileged user thread should be ... A single app ... | communication between the UI and the service occurs when the user requests ...
    (microsoft.public.dotnet.languages.csharp)
  • Windows service interaction with WinForms app?
    ... That's the question raised in a previous post [Make a Windows Service start a windows program]. ... It was suggested that if the service needs to interact with a WinForms app, then a privileged user thread should be used in the UI - no service required. ... The only other communication between the UI and the service occurs when the user requests the "time remaining until next project runtime" from the UI. ...
    (microsoft.public.dotnet.languages.csharp)