473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Windows Service unable to start at sytem restart!

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,
Dec 14 '07 #1
9 3455
Talk to Maqssood Ahmed.

He has an identical problem.
"Yasir Zaheer" <ya**********@gmail.comwrote in message
news:c9**********************************@e25g2000 prg.googlegroups.com...
>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,
Dec 14 '07 #2
If we both have the same problem how are we gonna solve it via
discussion?
On Dec 14, 1:22 pm, "Stephany Young" <noone@localhostwrote:
Talk to Maqssood Ahmed.

He has an identical problem.

"Yasir Zaheer" <yasir.sof...@gmail.comwrote in message

news:c9**********************************@e25g2000 prg.googlegroups.com...
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,- Hide quoted text -

- Show quoted text -
Dec 14 '07 #3
On Dec 14, 10:25 am, Yasir Zaheer <yasir.sof...@gmail.comwrote:
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
Dec 14 '07 #4
Thanks John for the hint.... but do you people have any solution for
that.. is yes please let me know!
regards,
Yasir Zaheer
On Dec 14, 3:52 pm, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
On Dec 14, 10:25 am, Yasir Zaheer <yasir.sof...@gmail.comwrote:
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
Dec 14 '07 #5
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]
- mv*@spam.guard.caspershouse.com

"Yasir Zaheer" <ya**********@gmail.comwrote in message
news:c9**********************************@e25g2000 prg.googlegroups.com...
>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,

Dec 14 '07 #6
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
Dec 15 '07 #7
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!

On Dec 14, 11:24 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
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]
- m...@spam.guard.caspershouse.com

"Yasir Zaheer" <yasir.sof...@gmail.comwrote in message

news:c9**********************************@e25g2000 prg.googlegroups.com...
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,
Dec 16 '07 #8
Dont know if it will help but I got some help from service loader/
runner from http://theimes.com

//CY
Dec 16 '07 #9
Thanks christ,

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

Regards,
On Dec 16, 4:49 pm, christ...@gmail.com wrote:
Dont know if it will help but I got some help from service loader/
runner fromhttp://theimes.com

//CY
Dec 26 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Francis Lavoie | last post by:
Is it possible to restart windows services? (remotely and locally) Because I have a little script that retreive the LastWaitTimeout key of the automatic update, delete that key if it out schedule...
7
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: ...
14
by: iceman | last post by:
Hello, I have a windows service. I want to restart it after every 24 hour. Is it possible to restart the service programmatically(from the service itself) using the sercvice controller object?...
6
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop()...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
7
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the...
7
by: shai | last post by:
I am working at .net 1.1, writing in c#. I have windows service with a COM object. Every unexpected time The COM object throw an error that make my service get stuck (do not respond). I can catch...
6
by: sergio.calleja | last post by:
Hi Everybody, i need to restart a windows service made with c# when an fixed event is raised. So to test it, I've added a servicecontroller to my service, and in the creation method, i've created...
3
by: Maqsood Ahmed | last post by:
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,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.