title: Topshelf Windows Service times out Error 7000 7009
body: <p>I have a windows service programmed in vb.NET, using Topshelf as Service Host.
  Once in a while the service doesn't start. On the event log, the SCM writes errors 7000 and 7009 (service did not respond in a timely fashion). I know this is a common issue, but I (think) I have tried everything with no result.
  The service only relies in WMI, and has no time-consuming operations.
  I read this question (<a href="https://stackoverflow.com/questions/158371/error-1053-the-service-did-not-respond-to-the-start-or-control-request-in-a-tim">Error 1053: the service did not respond to the start or control request in a timely fashion</a>), but none of the answers worked for me.</p>
  
  <p>I Tried:</p>
  
  <ul>
  <li>Set topshelf's start timeout.</li>
  <li>Request additional time in  the first line of "OnStart" method.</li>
  <li>Set a periodic timer wich request additional time to the SCM.</li>
  <li>Remove TopShelf and make the service with the Visual Studio Service Template.</li>
  <li>Move the initialization code and "OnStart" code to a new thread to return inmediately.</li>
  <li>Build in RELEASE mode.</li>
  <li>Set GeneratePublisherEvidence = false in the app.config file (per application).</li>
  <li>Unchecked "Check for publisher’s certificate revocation" in the internet settings (per machine).</li>
  <li>Deleted all Alternate Streams (in case some dll was marked as web and blocked).</li>
  <li>Removed any "Debug code" </li>
  <li>Increased Window's general service timeout to 120000ms.</li>
  </ul>
  
  <p>Also:</p>
  
  <ul>
  <li>The service doesn't try to communicate with the user's desktop in any way.</li>
  <li>The UAC is disabled.</li>
  <li>The Service Runs on LOCAL SYSTEM ACCOUNT.</li>
  </ul>
  
  <p>I believe that the code of the service itself is not the problem because:</p>
  
  <ul>
  <li>It has been on production for over two years.</li>
  <li>Usually the service starts fine.</li>
  <li>There is no exception logged in the Event Log.</li>
  <li>The "On Error" options for the service dosn't get called (since the service doesn't actually fails, just doesn't respond to the SCM)</li>
  <li>I've commented out almost everything on it, pursuing this error! ;-)</li>
  </ul>
  
  <p>Any help is welcome since i'm completely out of ideas, and i've been strugling with this for over 15 days...</p>