title: Starting a specific Firefox Profile with Selenium 3
body: <p>I am trying to upgrade from Selenium 2 to Selenium 3 but the old handling, which was pretty easy and fast doesn't work anymore (and the documentation is nonexisting as it seems)</p>
  <p>This is the program at the moment and what I want is to open a Firefox driver with the profile: SELENIUM</p>
  <p>Sadly it doesn't work and always shuts down with the Error:</p>
  <blockquote>
  <p>An unhandled exception of type 'System.InvalidOperationException' &gt; occurred in WebDriver.dll</p>
  <p>Additional information: corrupt deflate stream</p>
  </blockquote>
  <p>This is my program at the moment:</p>
  <pre><code>public Program()
  {
      FirefoxOptions _options = new FirefoxOptions();
      FirefoxProfileManager _profileIni = new FirefoxProfileManager();
      FirefoxDriverService _service = FirefoxDriverService.CreateDefaultService(@&quot;C:\Programme\IMaT\Output\Release\Bin&quot;);
      _service.FirefoxBinaryPath = @&quot;C:\Program Files (x86)\Mozilla Firefox\firefox.exe&quot;;
      try
      {
          if ((_options.Profile = _profileIni.GetProfile(&quot;SELENIUM&quot;)) == null)
          {
              Console.WriteLine(&quot;SELENIUM PROFILE NOT FOUND&quot;);
              _profile.SetPreference(&quot;network.proxy.type&quot;, 0); // disable proxy
              _profile = new FirefoxProfile();
          }
      }
      catch
      {
          throw new Exception(&quot;Firefox needs a Profile with \&quot;SELENIUM\&quot;&quot;);
      }
      IWebDriver driver = new FirefoxDriver(_service,_options,new System.TimeSpan(0,0,30));        
      driver.Navigate().GoToUrl(&quot;ld-hybrid.fronius.com&quot;);
      Console.Write(&quot;rtest&quot;);
  }
  
  static void Main(string[] args)
  {
      new Program();
  }
  </code></pre>
  <p>Without Loading the Profile it works with just new FirefoxDriver(_service) but the profile is mandatory.</p>
  <p>In Selenium 2 I handled it with this code:</p>
  <pre><code>FirefoxProfileManager _profileIni = new FirefoxProfileManager();
  // use custom temporary profile
  try { 
      if ((_profile = _profileIni.GetProfile(&quot;SELENIUM&quot;)) == null)
      {
          Console.WriteLine(&quot;SELENIUM PROFILE NOT FOUND&quot;);
          _profile.SetPreference(&quot;network.proxy.type&quot;, 0); // disable proxy
          _profile = new FirefoxProfile();
      }
  }
  catch
  {
      throw new Exception(&quot;Firefox needs a Profile with \&quot;SELENIUM\&quot;&quot;);
  }
  
  _profile.SetPreference(&quot;intl.accept_languages&quot;, _languageConfig);
  _driver = new FirefoxDriver(_profile);
  </code></pre>
  <p>Fast and simple, but as the Driver doesn't support a Constructor with service and profile I don't really know how to get this to work, any help would be appreciated</p>