Windows Service unable to start at sytem restart!

  • Thread starter Thread starter Yasir Zaheer
  • Start date Start date
Y

Yasir Zaheer

I have made a windows service which is configured to start
automatically at the system startup under the USER account type. The
service is working perfectly fine when I try to start it manually, but
it is unable to start automatically at system restart and following
errors are displayed in the Event Logs.

1 - Timeout (30000 milliseconds) waiting for the (Service Name)
service to connect.
2 - The (Service Name) service failed to start due to the following
error: The service did not respond to the start or control request in
a timely fashion.

I also have also tried to write log entries in 'OnStart()' and Main
methods but the logs are also not displayed.
Does it indicate that it requires user credentials within 30 seconds?

I am using C# with .NET framework 2.0. I have tried to run the service
on Windows XP Pro and Windows Server 2003.

Regards,
 
If we both have the same problem how are we gonna solve it via
discussion?

It was a subtle hint that posting exactly the same question under two
different names isn't going to solve your problem any faster.

Jon
 
Thanks John for the hint.... but do you people have any solution for
that.. is yes please let me know!
regards,
Yasir Zaheer
 
Are you trying to interact with the desktop in any way?

If the service runs while you are logged in, my assumption would be
"yes". When you start the machine up, there is no interactive login
session, and if you are trying to do something with the desktop when you
start, then it's going to fail, since no one is logged in.
 
Any UI going on? supported in XP, but not in Vista as I belive...

in XP might try "Interact with desktop", might try a sleep in the
beginning of startup just to get it working

//CY
 
No Nicholas.... I am not trying to interact with the desktop!

Actually desktop interaction is only possible if I run it under "Local
System" Account. As i told you i am running under specific "User"
account.

thanks for your interest,
Regards,

Yasir Zaheer!

Are you trying to interact with the desktop in any way?

If the service runs while you are logged in, my assumption would be
"yes". When you start the machine up, there is no interactive login
session, and if you are trying to do something with the desktop when you
start, then it's going to fail, since no one is logged in.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


I have made a windows service which is configured to start
automatically at the system startup under the USER account type. The
service is working perfectly fine when I try to start it manually, but
it is unable to start automatically at system restart and following
errors are displayed in the Event Logs.
1 - Timeout (30000 milliseconds) waiting for the (Service Name)
service to connect.
2 - The (Service Name) service failed to start due to the following
error: The service did not respond to the start or control request in
a timely fashion.
I also have also tried to write log entries in 'OnStart()' and Main
methods but the logs are also not displayed.
Does it indicate that it requires user credentials within 30 seconds?
I am using C# with .NET framework 2.0. I have tried to run the service
on Windows XP Pro and Windows Server 2003.
 
Thanks christ,

but this loader/runner just do nothing else than provide the
functionalities service controller provides.

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top