title: Selenium - Visual Studios- C# - All (chrome, firefox, and internet explorer) webdrivers unable to start driver service
body: <p>I'm trying to set up Selenium for testing and none of my webdrivers seem to work.  I have tried moving them around in the project folder and the only way I can get Visual Studios to locate them is with a @"path" statement.</p>
  
  <p>The real problem is... Once Visual Studio locates the webdriver, the operation times out and I get the following exception:</p>
  
  <p><em>An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll
  Additional information:  Cannot start the driver service on <a href="http://localhost:(random" rel="noreferrer">http://localhost:(random</a> port number that changes every time)</em></p>
  
  <p>I have tried restarting my computer and having the system administrator check the firewall and malware blocker logs, but neither seems to have helped (or they don't know the correct thing to look for).</p>
  
  <p>I figure this is something super simple and I'm just missing it... Any help would be greatly appreciated.</p>
  
  <p>Here is a copy of my code:</p>
  
  <pre><code>using OpenQA.Selenium;
  using OpenQA.Selenium.Firefox;
  using OpenQA.Selenium.Support.UI;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using OpenQA.Selenium.Chrome;
  using OpenQA.Selenium.IE;
  
  namespace SeleniumWork
  {
      class Program
      {
          static void Main(string[] args)
          {
  
                  IWebDriver driver = new InternetExplorerDriver(@"C:\blahblahpathstring");
  
                  driver.Navigate().GoToUrl("http://www.google.com/");
  
                  IWebElement query = driver.FindElement(By.Name("q"));
  
                  query.SendKeys("Cheese");
  
                  query.Submit();
  
                  var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
                  wait.Until(d =&gt; d.Title.StartsWith("cheese", StringComparison.OrdinalIgnoreCase));
  
                  Console.WriteLine("Page title is: " + driver.Title);
          }
      }
  }
  </code></pre>
  
  <p>Here is a copy of the debug output I receive:</p>
  
  <pre><code>A first chance exception of type 'System.Net.WebException' occurred in System.dll
  A first chance exception of type 'System.Net.WebException' occurred in System.dll
  A first chance exception of type 'System.Net.WebException' occurred in System.dll
  A first chance exception of type 'System.Net.WebException' occurred in System.dll
  A first chance exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll
  </code></pre>