title: Error Expected browser binary location when run selenium in windows hosting
body: <p>this sample work:
  get text of google and show in home page sample asp.net
  test for correct work selenium in windows host.</p>
  
  <p>i want to run selenium in windows hosting plesk.</p>
  
  <p>error for me:</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
    
    <p>Expected browser binary location, but unable to find binary in default
    location, no 'moz:firefoxOptions.binary' capability provided, and no
    binary flag set on the command line (SessionNotCreated)</p>
    
    <p>Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.InvalidOperationException: Expected browser
    binary location, but unable to find binary in default location, no
    'moz:firefoxOptions.binary' capability provided, and no binary flag
    set on the command line (SessionNotCreated)</p>
    
    <p>Source Error: </p>
    
    <p>An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.
    Stack Trace: </p>
    
    <p>[InvalidOperationException: Expected browser binary location, but
    unable to find binary in default location, no
    'moz:firefoxOptions.binary' capability provided, and no binary flag
    set on the command line (SessionNotCreated)]<br>
    OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response
    errorResponse) +1059<br>
    OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String
    driverCommandToExecute, Dictionary`2 parameters) +125<br>
    OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities
    desiredCapabilities) +235<br>
    OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor
    commandExecutor, ICapabilities desiredCapabilities) +54<br>
    OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxOptions options)
    +81    WebDriverwithwebapp._Default.Page_Load(Object sender, EventArgs e) +178<br>
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
    EventArgs e) +51    System.Web.UI.Control.OnLoad(EventArgs e) +95<br>
    System.Web.UI.Control.LoadRecursive() +59<br>
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +678</p>
  </blockquote>
  
  <pre><code>   protected void Page_Load(object sender, EventArgs e)
      {
  
          FirefoxOptions options = new FirefoxOptions();
          options.BrowserExecutableLocation = ("C:\\Program Files\\Mozilla Firefox\\firefox.exe"); //This is the location where you have installed Firefox on your machine
  
         // WebDriver driver = new FirefoxDriver(options);
  
          using (var FireFoxPage = new FirefoxDriver())
          {
              //_driver = new FireFoxDriver();
              _driver.Manage().Window.Maximize();
              _driver.SwitchTo().Window(_driver.CurrentWindowHandle);
              _driver.Manage().Cookies.DeleteAllCookies();
              // _driver.Manage().Timeouts().ImplicitWait(TimeSpan.FromSeconds(3));
  
              _driver.Navigate().GoToUrl("https://google.com/");
  
              _driver.FindElement(By.Id(Button_ID)).Click();
  
  
            IwebElement  Element1 = _driver.FindElement(By.XPath("/html/body/main/div/div/div[3]/span"));
              ksc = Element1.Text.ToString();
  
              Label1.Text = ksc.ToString();
  
              _driver.Quit();
              Process[] geckodriverProcesses = Process.GetProcessesByName("geckodriver");
              foreach (var geckodriver in geckodriverProcesses)
              {
                  geckodriver.Kill();
              }
  
          }
  
  
  
      }
  </code></pre>