title: unable to use selenium via ASP.NET and C#
body: <p>I have read alot of the answer on here about my question, but they do not help, because everything i try has not worked</p>
  
  <p>I am using Selenium via ASP.NET C# on my web app. I want to be able to login and get a webpage and parse that page.</p>
  
  <p>My problem is that it continues to say cannot find binary(chrome or firefox). The environment path contains the location to both. I add the Binary path and still nothing. The code I have attempted is below:</p>
  
  <pre><code>var ffBinary = new FirefoxBinary(@"C:\Program Files\Mozilla Firefox\firefox.exe");
  var firefoxProfile = new FirefoxProfile(ProfilePath);
  var driver = new FirefoxDriver(firefoxProfile);
  </code></pre>
  
  <p>This tells me it cannot find the binary for firefox, but the executable is in that location</p>
  
  <pre><code>var options = new OpenQA.Selenium.Chrome.ChromeOptions();
  options.BinaryLocation = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"; 
  var driver = new ChromeDriver(AppDomain.CurrentDomain.BaseDirectory + @"\Scripts", options, TimeSpan.FromSeconds(180)); 
  </code></pre>
  
  <p>I mean this looks perfectly fine, but i am getting nowhere. Can somebody help me with this conundrum?</p>
  
  <p>Here is the error:
  <strong>Specified firefox binary location does not exist or is not a real file: C:\Program Files\Mozilla Firefox\firefox.exe</strong> </p>
  
  <p>Here is the stack trace:</p>
  
  <p><strong>[WebDriverException: Specified firefox binary location does not exist or is not a real file: C:\Program Files\Mozilla Firefox\firefox.exe]
     OpenQA.Selenium.Firefox.Internal.Executable..ctor(String userSpecifiedBinaryPath) +229
     OpenQA.Selenium.Firefox.FirefoxBinary..ctor(String pathToFirefoxBinary) +87
     AddNewFanTmPlyrs.YahooFanTm(String URLLink, String UNm, String PW) in h:\root\home\slickpk-001\www\site1\AddNewFanTmPlyrs.aspx.cs:394
     AddNewFanTmPlyrs.LoadTmBtn_Click(Object sender, EventArgs e) in h:\root\home\slickpk-001\www\site1\AddNewFanTmPlyrs.aspx.cs:194
     System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9659822
     System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +108
     System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639</strong></p>