473,739 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

1053 error trying to start my .NET windows service

Hi I have written a windows service in C# / .NET
I have installed it and it's working fine on a couple boxes but on my XP box
I get this error when I try to start it:

Error 1053: The service did not respond to the start or control request in a
timely fashion.

I understand that the scm issue the start and is supposed to put up this
error after some timeout period but it's coming up after only about half a
second and it doesnt even appear to have loaded my assembly. Note that it
only takes a couple seconds to start on the boxes that it works on.

Googling has only turned up actually taking too long or eventlog full as
causes. It fails identically for me with an empty eventlog...

I suspect there's some service registration corruption or something behind
this. Has anyone run into this before and resolved it?

thanks :-)
-john
Apr 24 '07 #1
7 13389
PS I forgot to note that I am just running this service in the standard Local
System account and I'm trying to log to the eventlog first thing in cctor.
The log message never shows up. I have another service that also runs as
Local System and can log to the event log fine.
thanks again :-)
-john
Apr 24 '07 #2
Hi John,

Here's my understanding of the issue so far, please feel free to correct me
if I've misunderstood anything:

1) This is an environment specific issue, which means it only occurs on a
specific system
2) You're not sure if the service assembly gets executed or not since the
error occurs real quick after you try to start it
Well, I think we need to first make sure if the assembly gets executed or
not: if it's not, then it's obviously a service configuration problem; we
will have to look elsewhere. If it's executed but immediately exits, then
we need to debug the application to see why it fails. To determine that, we
could use Process Monitor
(http://www.microsoft.com/technet/sys...eads/processmo
nitor.mspx) to monitor the file/registry access to see if there's any error.

To debug a service's startup code, please refer to following article:

#DebugInfo.com - Debugging startup code of services and COM servers
http://www.debuginfo.com/articles/debugstartup.html
Please reply here to let me know the result on your side. Thanks.
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 25 '07 #3


"Walter Wang [MSFT]" wrote:
Hi John,

Here's my understanding of the issue so far, please feel free to correct me
if I've misunderstood anything:

1) This is an environment specific issue, which means it only occurs on a
specific system
2) You're not sure if the service assembly gets executed or not since the
error occurs real quick after you try to start it
Well, I think we need to first make sure if the assembly gets executed or
not: if it's not, then it's obviously a service configuration problem; we
will have to look elsewhere. If it's executed but immediately exits, then
we need to debug the application to see why it fails. To determine that, we
could use Process Monitor
(http://www.microsoft.com/technet/sys...eads/processmo
nitor.mspx) to monitor the file/registry access to see if there's any error.

To debug a service's startup code, please refer to following article:

#DebugInfo.com - Debugging startup code of services and COM servers
http://www.debuginfo.com/articles/debugstartup.html
Please reply here to let me know the result on your side. Thanks.
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 25 '07 #4
Hi Walter,

Thats correct but with the exception that it's not specific to just one
machine. I have tried it on a couple different machines with XP and it has
failed identically on both. I have had success on W2K3, Vista, and Vista.x64.

I installed process monitor and btw thanks for that tip I'm sure it will
come in handy for many other things as well. Not exactly sure what to look
for in the very long output but the one thing that did catch my eye was that
by service process does get loaded and it looks like it's config file gets
read and some dlls get loaded but I don't think it ever gets to my entry
point. The process exit code is 80131700 which error lookup doesn't find but
google suggests that it means the shim couldnt load the CLR.
I fear this is as misleading as the scm "did not start in a timely fashion"
error message because I have 1.0, 1.1, 2.0, and 3.0 on there, all patched
current. I built my service with VS2005, nothing special like MSBee so it
should target 2.0.50727. I can run other apps built with it fine and even run
this one fine as a console app if I add in a dummy main and have it new my
service class and call onstart on it. I can send you the process monitor
capture log if youd like to dig deeper.

I am proceeding to the IFEO stuff but it will take some time as I dont have
VS on that box... argh... :-)

thanks again for your help!
-john

"Walter Wang [MSFT]" wrote:
Hi John,

Here's my understanding of the issue so far, please feel free to correct me
if I've misunderstood anything:

1) This is an environment specific issue, which means it only occurs on a
specific system
2) You're not sure if the service assembly gets executed or not since the
error occurs real quick after you try to start it
Well, I think we need to first make sure if the assembly gets executed or
not: if it's not, then it's obviously a service configuration problem; we
will have to look elsewhere. If it's executed but immediately exits, then
we need to debug the application to see why it fails. To determine that, we
could use Process Monitor
(http://www.microsoft.com/technet/sys...eads/processmo
nitor.mspx) to monitor the file/registry access to see if there's any error.

To debug a service's startup code, please refer to following article:

#DebugInfo.com - Debugging startup code of services and COM servers
http://www.debuginfo.com/articles/debugstartup.html
Please reply here to let me know the result on your side. Thanks.
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 25 '07 #5
Another interesting thing was that it looks in the registry under
HKLM\System\Cur rentControlSet\ Hardware Profiles
0001\System\Cur rentControlSet\ Enum\Root\LEGAC Y_xxxx\0000
where xxxx is my service name. I entered no such key. Could it be a
coincidence that there's a legacy service with the same name or is this from
previous installs that failed do to the service not starting?

thank :-)

"John.NET" wrote:
Hi Walter,

Thats correct but with the exception that it's not specific to just one
machine. I have tried it on a couple different machines with XP and it has
failed identically on both. I have had success on W2K3, Vista, and Vista.x64.

I installed process monitor and btw thanks for that tip I'm sure it will
come in handy for many other things as well. Not exactly sure what to look
for in the very long output but the one thing that did catch my eye was that
by service process does get loaded and it looks like it's config file gets
read and some dlls get loaded but I don't think it ever gets to my entry
point. The process exit code is 80131700 which error lookup doesn't find but
google suggests that it means the shim couldnt load the CLR.
I fear this is as misleading as the scm "did not start in a timely fashion"
error message because I have 1.0, 1.1, 2.0, and 3.0 on there, all patched
current. I built my service with VS2005, nothing special like MSBee so it
should target 2.0.50727. I can run other apps built with it fine and even run
this one fine as a console app if I add in a dummy main and have it new my
service class and call onstart on it. I can send you the process monitor
capture log if youd like to dig deeper.

I am proceeding to the IFEO stuff but it will take some time as I dont have
VS on that box... argh... :-)

thanks again for your help!
-john

"Walter Wang [MSFT]" wrote:
Hi John,

Here's my understanding of the issue so far, please feel free to correct me
if I've misunderstood anything:

1) This is an environment specific issue, which means it only occurs on a
specific system
2) You're not sure if the service assembly gets executed or not since the
error occurs real quick after you try to start it
Well, I think we need to first make sure if the assembly gets executed or
not: if it's not, then it's obviously a service configuration problem; we
will have to look elsewhere. If it's executed but immediately exits, then
we need to debug the application to see why it fails. To determine that, we
could use Process Monitor
(http://www.microsoft.com/technet/sys...eads/processmo
nitor.mspx) to monitor the file/registry access to see if there's any error.

To debug a service's startup code, please refer to following article:

#DebugInfo.com - Debugging startup code of services and COM servers
http://www.debuginfo.com/articles/debugstartup.html
Please reply here to let me know the result on your side. Thanks.
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 25 '07 #6
Ok I tried the IFEO trick and verified that my code is never getting entered.
The vsjitdebugger comes up, I choose my already opened one with the break
points already set, and see it go into the running state. But after a second
or two it subsequently stops debugging without ever having hit any of my
breakpoints (cctor, ctor, OnStart)

"John.NET" wrote:
Hi Walter,

Thats correct but with the exception that it's not specific to just one
machine. I have tried it on a couple different machines with XP and it has
failed identically on both. I have had success on W2K3, Vista, and Vista.x64.

I installed process monitor and btw thanks for that tip I'm sure it will
come in handy for many other things as well. Not exactly sure what to look
for in the very long output but the one thing that did catch my eye was that
by service process does get loaded and it looks like it's config file gets
read and some dlls get loaded but I don't think it ever gets to my entry
point. The process exit code is 80131700 which error lookup doesn't find but
google suggests that it means the shim couldnt load the CLR.
I fear this is as misleading as the scm "did not start in a timely fashion"
error message because I have 1.0, 1.1, 2.0, and 3.0 on there, all patched
current. I built my service with VS2005, nothing special like MSBee so it
should target 2.0.50727. I can run other apps built with it fine and even run
this one fine as a console app if I add in a dummy main and have it new my
service class and call onstart on it. I can send you the process monitor
capture log if youd like to dig deeper.

I am proceeding to the IFEO stuff but it will take some time as I dont have
VS on that box... argh... :-)

thanks again for your help!
-john

"Walter Wang [MSFT]" wrote:
Hi John,

Here's my understanding of the issue so far, please feel free to correct me
if I've misunderstood anything:

1) This is an environment specific issue, which means it only occurs on a
specific system
2) You're not sure if the service assembly gets executed or not since the
error occurs real quick after you try to start it
Well, I think we need to first make sure if the assembly gets executed or
not: if it's not, then it's obviously a service configuration problem; we
will have to look elsewhere. If it's executed but immediately exits, then
we need to debug the application to see why it fails. To determine that, we
could use Process Monitor
(http://www.microsoft.com/technet/sys...eads/processmo
nitor.mspx) to monitor the file/registry access to see if there's any error.

To debug a service's startup code, please refer to following article:

#DebugInfo.com - Debugging startup code of services and COM servers
http://www.debuginfo.com/articles/debugstartup.html
Please reply here to let me know the result on your side. Thanks.
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 25 '07 #7
Hi John,

Based on above information so far, it looks like an assembly loading
problem; there might be some dependent assembly not loaded when running
under SCM.

Try to use the fusion log:

#Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn2.microsoft.com/en-us/lib...c4(VS.71).aspx

#Suzanne Cook's .NET CLR Notes : Debugging Assembly Loading Failures
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx

You can also send me the Process Monitor's log for inspection. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 26 '07 #8

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

Similar topics

2
488
by: 3dr | last post by:
I am developing a service which I install and run on a number of servers. It works on most machines I have installed it on, but I always get a 1053, service will not start in a timely fashion message on one server. I have reduced the code to almost nothing so as to remove almost all the proper code. My main function looks like this static void Main()
1
7746
by: mtc | last post by:
I'm able to install and run a service I built on two machines - the one I built it on and another that has visual studio installed. I've installed it without problems on 3 other machines that don't have visual studio, but when I try to start the service it immediately fails with error 1053: The service did not respond to the start or control request in a timely fashion. The computers are all up-to-date with SP's and the .Net framework...
6
13105
by: Ashwin Kambli | last post by:
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...
5
14124
by: Richard Steele | last post by:
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...
2
3623
by: 3dr | last post by:
I am developing a service which I install and run on a number of servers. It works on most machines I have installed it on, but I always get a 1053, service will not start in a timely fashion message on one server. I have reduced the code to almost nothing so as to remove almost all the proper code. My main function looks like this static void Main()
5
3636
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE") 'p.Start("C:\WINDOWS\SYSTEM32\macrun.exe", sPPTOut)
1
10149
by: magnus.s.olsson | last post by:
I have got a Windows Service application from a customer that I try to start. The customer can start it with no problem, but when I try to start it I get: "Could not start the GateWay service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion."
0
3089
by: daniel kumar | last post by:
Hi this is Daniel Kumar, I installed oracle apps11i in my system on windows enterprise 2003 edition about one week back, at that time it working properly. today when i start my computer one service was stopped that is 'oracle concmgrprod service', when i start manually it is giving error that is could not start the oracle concmgrprod service on local computer error 1053:the service did not respond to the start or control request...
0
1218
by: DeV | last post by:
Hi, I'm running into a problem which I cannot seem to get solved. When I make my own service I have the following code: Protected Overrides Sub OnStart(ByVal args() As String) Dim t As New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf Worker.DoWork)) t.Start() End Sub
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8792
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,...
0
9479
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9266
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
8215
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
6754
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
6054
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();...
3
2193
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.