title: What is stopping (not crashing) my windows service?
body: <p>We have a .NET Windows Service that occasionally shuts down on one particular server, about three times in the last month.  Logging shows that the <code>OnStop</code> method is being called, so I don't think the service is crashing.  However, we don't know what's shutting down the service.</p>
  
  <p>Is there any way to find out what's shutting down the service? Is there anything I can log during <code>OnStop</code>? The Windows Event Viewer just shows application shut down and the security log does not show any user account authenticated at the time.</p>
  
  <p>The service is running in .NET 3.5 SP1 on Windows Server 2003 SP2 (5.2.3790).</p>
  
  <p>There are no service dependencies.  This service doesn't depend on any other services and no other services depend on this service.</p>