title: Cannot start Appium server programmatically
body: <p>I'd like to run an Appium server with default settings from C# like that:</p>
  
  <pre><code>AppiumLocalService appiumLocalService = AppiumLocalService.BuildDefaultService();
  appiumLocalService.Start();
  </code></pre>
  
  <p>I also set the environment variables right before that:</p>
  
  <pre><code>Environment.SetEnvironmentVariable(AppiumServiceConstants.NodeBinaryPath, @"C:\Program Files\nodejs\node.exe");
  Environment.SetEnvironmentVariable(AppiumServiceConstants.AppiumBinaryPath,@"C:\Program Files (x86)\Appium\resources\app\node_modules\appium\lib\main.js"
  </code></pre>
  
  <p>When I am trying to run the code is stopping for 2 minutes, and I get the following exception:</p>
  
  <blockquote>
    <p>Message: OpenQA.Selenium.Appium.Service.Exceptions.AppiumServerHasNotBeenStartedLocallyException : The local appium server has not been started. The given Node.js executable: C:\Program Files\nodejs\node.exe Arguments: "C:\Program Files (x86)\Appium\resources\app\node_modules\appium\lib\main.js" --port 4723 --address 127.0.0.1. 
    Time 120000 ms for the service starting has been expired!</p>
  </blockquote>
  
  <p>I Googled a lot, but I couldn't find the answer for that. I can start Appium manually from console or from Desktop Application without any problem.</p>
  
  <ul>
  <li>Appium Dotnet version: 3.0.0.2</li>
  <li>Appium version: 1.11.1</li>
  <li>Node.js version: v10.15.1</li>
  </ul>
  
  <p>I appreciate any suggestion/help.</p>