Windows service 1053 error during startup.

  • Thread starter Thread starter Ashwin Kambli
  • Start date Start date
A

Ashwin Kambli

Hi,
I am trying to write a Windows Service application using C#.
I wrote a very trivial example (logs messages during Start and Stop events
to the evenlog). I have no problem installing it (using installutil.exe).
But, when I try to start the service it times out and gives me a "Error:
1053 The service did not respond to the start or control request in a timely
fashion." message. Whats strange is that I have no problem starting up this
service on a different machine with the same configuration as mine.
I even tried a sample project by microsoft to check this
(http://download.microsoft.com/download/f/c/5/fc59614c-f610-4ab5-a9bb-82b784
741313/CreatingAWindowsServiceSample.exe) But, I had the same problem during
its start up as I did with my other service.
My m/c config is: Windows 2000 professional, Version 5.0.2195, sp4.
The serviceprocessinstaller uses the "LocalSystem" account while installing.
Any help is greatly appreciated.
Thank you
Ashwin Kambli
 
Try this

protected override void OnStart(string[] args)

{

Thread t = new Thread(new ThreadStart(YourApp.ThreadRun));

t.Start();


}
 
I tried it. Still does not work.

Chao Gao said:
Try this

protected override void OnStart(string[] args)

{

Thread t = new Thread(new ThreadStart(YourApp.ThreadRun));

t.Start();


}

Ashwin Kambli said:
Hi,
I am trying to write a Windows Service application using C#.
I wrote a very trivial example (logs messages during Start and Stop events
to the evenlog). I have no problem installing it (using installutil.exe).
But, when I try to start the service it times out and gives me a "Error:
1053 The service did not respond to the start or control request in a timely
fashion." message. Whats strange is that I have no problem starting up this
service on a different machine with the same configuration as mine.
I even tried a sample project by microsoft to check this
(http://download.microsoft.com/download/f/c/5/fc59614c-f610-4ab5-a9bb-82b784
741313/CreatingAWindowsServiceSample.exe) But, I had the same problem during
its start up as I did with my other service.
My m/c config is: Windows 2000 professional, Version 5.0.2195, sp4.
The serviceprocessinstaller uses the "LocalSystem" account while installing.
Any help is greatly appreciated.
Thank you
Ashwin Kambli
 
Yes I did. All it suggests is changing the start type from "Automatic" to
"Manual". It was of no help either.
 
It should, the as long as you return from OnStart within 30 seconds there
should be no problem.
When using a Thread delegate the method returns as soon as the thread has
started.

Willy.


Ashwin Kambli said:
I tried it. Still does not work.

Chao Gao said:
Try this

protected override void OnStart(string[] args)

{

Thread t = new Thread(new ThreadStart(YourApp.ThreadRun));

t.Start();


}

Ashwin Kambli said:
Hi,
I am trying to write a Windows Service application using C#.
I wrote a very trivial example (logs messages during Start and Stop events
to the evenlog). I have no problem installing it (using installutil.exe).
But, when I try to start the service it times out and gives me a
"Error:
1053 The service did not respond to the start or control request in a timely
fashion." message. Whats strange is that I have no problem starting up this
service on a different machine with the same configuration as mine.
I even tried a sample project by microsoft to check this
(http://download.microsoft.com/download/f/c/5/fc59614c-f610-4ab5-a9bb-82b784
741313/CreatingAWindowsServiceSample.exe) But, I had the same problem during
its start up as I did with my other service.
My m/c config is: Windows 2000 professional, Version 5.0.2195, sp4.
The serviceprocessinstaller uses the "LocalSystem" account while installing.
Any help is greatly appreciated.
Thank you
Ashwin Kambli
 
Back
Top