Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: 31 May 2005 14:24:18 -0700,    group: microsoft.public.dotnet.myservices        back       


Service Starts up fine but windows thinks not?   
Hi,

I wrote a windows service using C# and it runs fine. However every time
on reboot windows complains that the service hung on startup. After
logging into the computer and going to the Services panel I find the
service running just fine.

Any ideas as to why windows should complain the service hung when it
has not?

Also if I restart the service again directly from the Services panel I
get no such error. Puzzling.

Thanks,
Dinesh
date: 31 May 2005 14:24:18 -0700   author:   Dinesh

Re: Service Starts up fine but windows thinks not?   
The control of the SCM to start services is asynchronous. SCM waits only 
so long for your START event to finish, and return to caller, at which 
time the framework tells the SCM you are now started. SCM can timeout 
and give up waiting for you, and then you could actually be finishing a 
few seconds later. At system startup you may be waiting for a dependent 
resource, or perhaps just CPU. The .NET framework does not provide a 
mechanism for you to HINT that you need more time, as does the SDK 
approach. Therefore you need to find out what is taking so much time in 
your startup. There are several strategies to deal with this, depending 
upon what it is.

Dinesh wrote:
> Hi,
> 
> I wrote a windows service using C# and it runs fine. However every time
> on reboot windows complains that the service hung on startup. After
> logging into the computer and going to the Services panel I find the
> service running just fine.
> 
> Any ideas as to why windows should complain the service hung when it
> has not?
> 
> Also if I restart the service again directly from the Services panel I
> get no such error. Puzzling.
> 
> Thanks,
> Dinesh
date: Wed, 01 Jun 2005 09:33:48 -0700   author:   Lee Gillie

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us