title: C# Topshelf TimeoutException
body: <p>As a First step I created Windows Service project configured it properly and </p>
  
  <p>On second Step I have added <a href="http://docs.topshelf-project.com/en/latest/configuration/quickstart.html" rel="noreferrer">TopShelf</a> <em>Version 3.1.135.0</em> in my project If I run my service through (F5 Run) then it is loading Top-shelf Console and service is completed successfully.</p>
  
  <p>However When I am running it to install and Start it from command prompt I am having below TimeOut Error.</p>
  
  <pre><code>Topshelf.Hosts.StartHost Error: 0 : The service failed to start., System.Service
  Process.TimeoutException: Time out has expired and the operation has not been co
  mpleted.
  
  
  
   public class AppService
      {
          LoggingService loggingService = new LoggingService(typeof(AppService).Name);
  
  
          public void Start()
          {
              loggingService.Info("SampleService is Started");
              ExtractProcess.Start();
              TransformProcess.Start();
  
          }
  
          public void Stop()
          {
              loggingService.Info("SampleService is Stopped");
  
          }
      }
  </code></pre>
  
  <p>-- Updated Code to fix this issue</p>
  
  <pre><code> public void Start()
      {
          loggingService.Info("MPS.GOA.ETLService  is Started");
          ThreadStart myThreadDelegate = new ThreadStart(StartService);
          Thread myThread = new Thread(myThreadDelegate);
          myThread.Start();
  
      }
  
  private void StartService()
  {
      timer.Elapsed += new System.Timers.ElapsedEventHandler(OnElapsedTime);
      timer.Interval = 60000 * ServiceIntervalInMinutes;     //1 minute 60000 milliseconds
      timer.Enabled = true;
      Process();
  }
  
  private void Process()
  {
      ExtractProcess.Start();
      TransformProcess.Start();
  }
  </code></pre>
  
  <p>Any Suggestions?
  <img src="https://i.stack.imgur.com/5Daag.png" alt="Time Out Error"></p>