PC Review


Reply
Thread Tools Rate Thread

1053 error trying to start my .NET windows service

 
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      24th Apr 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      24th Apr 2007
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
 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      25th Apr 2007
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 ((E-Mail Removed), 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.

 
Reply With Quote
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      25th Apr 2007


"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 ((E-Mail Removed), 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.
>
>

 
Reply With Quote
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      25th Apr 2007
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 ((E-Mail Removed), 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.
>
>

 
Reply With Quote
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      25th Apr 2007
Another interesting thing was that it looks in the registry under
HKLM\System\CurrentControlSet\Hardware Profiles
0001\System\CurrentControlSet\Enum\Root\LEGACY_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 ((E-Mail Removed), 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.
> >
> >

 
Reply With Quote
 
=?Utf-8?B?Sm9obi5ORVQ=?=
Guest
Posts: n/a
 
      25th Apr 2007
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 ((E-Mail Removed), 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.
> >
> >

 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      26th Apr 2007
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/library/e74a18c4(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 ((E-Mail Removed), 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! VB.net Service error: "Could not start service on local computer. Error 1053: The service did not respond to the start or control request in a timely fashion." mrwoopey Microsoft Dot NET Framework 4 21st Aug 2008 06:27 PM
Windows XP Proffesinal service start error 1053 alp Windows XP General 0 30th Apr 2008 01:35 PM
Windows Service cannot start. Error 1053: =?Utf-8?B?UGV0ZXJX?= Microsoft Dot NET Framework 2 24th May 2005 03:32 PM
Error 1053- service will not start. Keith Microsoft Windows 2000 Terminal Server Applications 0 2nd Mar 2005 07:06 PM
.NET C# service error 1053, service could not start in timely fash =?Utf-8?B?M2Ry?= Microsoft ASP .NET 2 7th Sep 2004 10:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 PM.