473,746 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3474
Talk to Maqssood Ahmed.

He has an identical problem.
"Yasir Zaheer" <ya**********@g mail.comwrote in message
news:c9******** *************** ***********@e25 g2000prg.google groups.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@localhos twrote:
Talk to Maqssood Ahmed.

He has an identical problem.

"Yasir Zaheer" <yasir.sof...@g mail.comwrote in message

news:c9******** *************** ***********@e25 g2000prg.google groups.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...@g mail.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.co mwrote:
On Dec 14, 10:25 am, Yasir Zaheer <yasir.sof...@g mail.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.co m

"Yasir Zaheer" <ya**********@g mail.comwrote in message
news:c9******** *************** ***********@e25 g2000prg.google groups.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.guar d.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.c om

"Yasir Zaheer" <yasir.sof...@g mail.comwrote in message

news:c9******** *************** ***********@e25 g2000prg.google groups.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
3336
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 for our production needs. But still the service need to be restarded if I want that key to be reset, when Win Update will resynchronize with the sus server for new update. Thankx
7
712
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: service 1 - my service watches service 2 - windows service service 2 is stopped - service 1 starts service 2
14
25130
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? Or should i chose some other approach? Any ideas? Thanx for all help. - Iceman
6
3806
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() ServiceController.WaitForStatus(ServiceControllerStatus.Stopped) ServiceController.start() but doesn´t works. It seems waitforstatus instruction is the last
17
6442
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
2414
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 System.Diagnostic.Process object to start the application (i.e Notepad), the new app runs and it is listed on the task manger list, but the GUI doesn't show up in the desktop of the current user. I am aware windows service (either LocalSystem,...
7
7230
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 this error. I want to restart my windows service every time the COM object throws an error. I use System.ServiceProcess.ServiceController to stop and start my service. But there is one thing I do not understand:
6
9345
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 a new thread to try to stop it. This is my code: public Service1() { // This call is required by the Windows.Forms Component Designer.
3
2693
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, 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...
0
8800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8229
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6060
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4586
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.