title: Selenium iedriver IE 11 not starting
body: <p>I did not manage to make the ie webdriver work with Selenium and IE 11.</p>
  
  <p>The webdriver starts, receive the json request from my test runner and then crash.</p>
  
  <p>I am using :</p>
  
  <ul>
  <li>Selenium Webdriver 2.44</li>
  <li>IE Driver server 2.44 started on my session</li>
  <li>C#, Nunit</li>
  </ul>
  
  <p>I instantiate the RemoteWebDriver with the following options :</p>
  
  <ul>
  <li>url = <code>http://localhost:5555</code></li>
  <li>browser InternetExplore</li>
  </ul>
  
  <p>Here is what I've done :</p>
  
  <ul>
  <li>Setting the "Protected Mode" to either all-true or all-false across the different security zones</li>
  <li>adding the registry key/dword as said in <a href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration" rel="nofollow">https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration</a></li>
  <li>the iedriverserver.exe is in the PATH</li>
  <li>Unchecking "Enable Enhance Protected Mode" in advanced IE configuration</li>
  </ul>
  
  <p>I tried using directly the iewebdriver with no success.</p>
  
  <p>Any help/advice is appreciated.</p>
  
  <p>Here is the stack trace from the server (log level = TRACE)</p>
  
  <pre><code>C:\iedriverserver /log-level=trace
  I 2014-11-10 17:19:56:045 server.cc(72) Starting WebDriver server on port: '5555' on host: ''
  T 2014-11-10 17:19:56:045 server.cc(592) Entering Server::PopulateCommandRepository
  T 2014-11-10 17:19:56:045 IEServer.cpp(26) Entering IEServer::IEServer
  T 2014-11-10 17:19:56:045 server.cc(88) Entering Server::Start
  D 2014-11-10 17:19:56:045 server.cc(110) Civetweb ACL is -0.0.0.0/0,+127.0.0.1
  Started InternetExplorerDriver server (64-bit)
  2.44.0.0
  Listening on port 5555
  Log level is set to TRACE
  T 2014-11-10 17:20:15:745 server.cc(136) Entering Server::ProcessRequest
  T 2014-11-10 17:20:15:745 server.cc(200) Entering Server::ReadRequestBody
  T 2014-11-10 17:20:15:776 server.cc(145) Process request with: URI: /session HTTP verb: POST body: {"desiredCapabilities":{"browserName":"internet  explorer","version":"11","platform":"WINDOWS","ignoreProtectedModeSettings":"false"}}
  T 2014-11-10 17:20:15:776 server.cc(234) Entering Server::DispatchCommand
  T 2014-11-10 17:20:15:776 server.cc(541) Entering Server::LookupCommand
  D 2014-11-10 17:20:15:776 server.cc(243) Command: POST /session {"desiredCapabil
  ities":{"browserName":"internet explorer","version":"11","platform":"WINDOWS","ignoreProtectedModeSettings":"false"}}
  T 2014-11-10 17:20:15:776 IEServer.cpp(36) Entering IEServer::InitializeSession
  T 2014-11-10 17:20:15:776 IESession.cpp(34) Entering IESession::Initialize
  D 2014-11-10 17:20:15:776 IESession.cpp(49) Mutex acquired for session initalization
  D 2014-11-10 17:20:15:776 IESession.cpp(94) Using legacy driver implementation per user request
  T 2014-11-10 17:20:15:776 IECommandExecutor.cpp(396) Entering IECommandExecutor::ThreadProc
  T 2014-11-10 17:20:15:854 IECommandExecutor.cpp(90) Entering IECommandExecutor::OnCreate
  T 2014-11-10 17:20:15:854 IECommandExecutor.cpp(768) Entering IECommandExecutor::PopulateCommandHandlers
  T 2014-11-10 17:20:15:854 IECommandExecutor.cpp(755) Entering IECommandExecutor::PopulateElementFinderMethods
  T 2014-11-10 17:20:15:854 InputManager.cpp(34) Entering InputManager::InputManager
  T 2014-11-10 17:20:15:854 InputManager.cpp(57) Entering InputManager::Initialize
  
  T 2014-11-10 17:20:15:854 BrowserFactory.cpp(885) Entering BrowserFactory::GetExecutableLocation
  T 2014-11-10 17:20:15:854 BrowserFactory.cpp(926) Entering BrowserFactory::GetIEVersion
  T 2014-11-10 17:20:15:886 BrowserFactory.cpp(977) Entering BrowserFactory::GetOSVersion
  T 2014-11-10 17:20:15:901 IESession.cpp(118) Created thread for command executor returns HWND: '0000000000050500'
  T 2014-11-10 17:20:15:901 IESession.cpp(122) Session id is retrived from command  executor window: '52217b4d-06ed-4832-b91c-8acf59e631e2'
  D 2014-11-10 17:20:15:901 IESession.cpp(128) Releasing session initialization mutex
  T 2014-11-10 17:20:15:901 IESession.cpp(212) Entering IESession::ExecuteCommand
  T 2014-11-10 17:20:15:901 IECommandExecutor.cpp(157) Entering IECommandExecutor::OnSetCommand
  T 2014-11-10 17:20:15:901 command.cc(28) Entering Command::Deserialize
  D 2014-11-10 17:20:15:901 command.cc(33) Raw JSON command: { "name" : "newSession", "locator" : { }, "parameters" : {"desiredCapabilities":{"browserName":"inter
  net explorer","version":"11","platform":"WINDOWS","ignoreProtectedModeSettings":"false"}} }
  T 2014-11-10 17:20:15:917 IECommandExecutor.cpp(168) Entering IECommandExecutor::OnExecCommand
  T 2014-11-10 17:20:15:917 IESession.cpp(233) Beginning wait for response length to be not zero
  T 2014-11-10 17:20:15:917 IECommandExecutor.cpp(464) Entering IECommandExecutor::DispatchCommand
  </code></pre>
  
  <p>And here is the Stack Trace from my code runner :</p>
  
  <pre><code>Errors and Failures:
  1) TearDown Error : ConsoleApplication1.Features.SubscriptionFeature.Displ
  criptionForm with IE,UK
     Autofac.Core.DependencyResolutionException : An exception was thrown wh
  voking the constructor 'Void .ctor(System.String, System.String, System.Co
  ons.Generic.Dictionary`2[System.String,System.String])' on type 'RemoteWeb
  '. ---&gt; A exception with a null response was thrown sending an HTTP reques
  he remote WebDriver server for URL http://localhost:5555/session. The stat
  the exception was ReceiveFailure, and the message was: The underlying conn
   was closed: An unexpected error occurred on a receive. (See inner excepti
   details.)
    ----&gt; OpenQA.Selenium.WebDriverException : A exception with a null respo
  s thrown sending an HTTP request to the remote WebDriver server for URL ht
  ocalhost:5555/session. The status of the exception was ReceiveFailure, and
  essage was: The underlying connection was closed: An unexpected error occu
  n a receive.
    ----&gt; System.Net.WebException : The underlying connection was closed: An
  ected error occurred on a receive.
    ----&gt; System.IO.IOException : Unable to read data from the transport con
  n: An existing connection was forcibly closed by the remote host.
    ----&gt; System.Net.Sockets.SocketException : An existing connection was fo
   closed by the remote host
  TearDown : System.NullReferenceException : Object reference not set to an
  ce of an object.
     at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Insta
  ()
     at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInsta
  omponentContext context, IEnumerable`1 parameters)
     at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 paramet
     at Autofac.Core.Resolving.InstanceLookup.Execute()
     at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharing
  meScope currentOperationScope, IComponentRegistration registration, IEnume
  1 parameters)
     at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistrati
  istration, IEnumerable`1 parameters)
     at Autofac.ResolutionExtensions.TryResolveService(IComponentContext con
  Service service, IEnumerable`1 parameters, Object&amp; instance)
     at Autofac.ResolutionExtensions.ResolveNamed[TService](IComponentContex
  ext, String serviceName, IEnumerable`1 parameters)
     at ConsoleApplication1.Features.SubscriptionFeature.DisplaySubscription
  tring browser, String language)
  --WebDriverException
     at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest
  st)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandT
  te, Dictionary`2 parameters)
     at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor comman
  tor, ICapabilities desiredCapabilities)
     at lambda_method(Closure , Object[] )
     at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Insta
  ()
  --WebException
     at System.Net.HttpWebRequest.GetResponse()
     at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest
  st)
  --IOException
     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, I
  ize)
     at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size
     at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userR
  edStream, Boolean probeRead)
  --SocketException
     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, I
  ize)
  --TearDown
     at lambda_method(Closure , IContextManager )
     at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding bin
  IContextManager contextManager, Object[] arguments, ITestTracer testTracer
  Span&amp; duration)
     at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(Hook
  indingEvent)
     at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnScenarioEnd()
     at ConsoleApplication1.Features.SubscriptionFeature.ScenarioTearDown()
  
  2) TearDown Error : ConsoleApplication1.Features.SubscriptionFeature.Displ
  criptionForm with IE,FR
     Autofac.Core.DependencyResolutionException : An exception was thrown wh
  voking the constructor 'Void .ctor(System.String, System.String, System.Co
  ons.Generic.Dictionary`2[System.String,System.String])' on type 'RemoteWeb
  '. ---&gt; Unexpected error. System.Net.WebException: Unable to connect to th
  te server ---&gt; System.Net.Sockets.SocketException: No connection could be
  ecause the target machine actively refused it 127.0.0.1:5555
     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, Socke
  ss socketAddress)
     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure
  et s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState s
  IAsyncResult asyncResult, Exception&amp; exception)
     --- End of inner exception stack trace ---
     at System.Net.HttpWebRequest.GetRequestStream(TransportContext&amp; context
     at System.Net.HttpWebRequest.GetRequestStream()
     at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandTo
  e)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandT
  te, Dictionary`2 parameters) (See inner exception for details.)
    ----&gt; OpenQA.Selenium.WebDriverException : Unexpected error. System.Net.
  eption: Unable to connect to the remote server ---&gt; System.Net.Sockets.Soc
  eption: No connection could be made because the target machine actively re
  it 127.0.0.1:5555
     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, Socke
  ss socketAddress)
     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure
  et s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState s
  IAsyncResult asyncResult, Exception&amp; exception)
     --- End of inner exception stack trace ---
     at System.Net.HttpWebRequest.GetRequestStream(TransportContext&amp; context
     at System.Net.HttpWebRequest.GetRequestStream()
     at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandTo
  e)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandT
  te, Dictionary`2 parameters)
  TearDown : System.NullReferenceException : Object reference not set to an
  ce of an object.
     at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Insta
  ()
     at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInsta
  omponentContext context, IEnumerable`1 parameters)
     at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 paramet
     at Autofac.Core.Resolving.InstanceLookup.Execute()
     at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharing
  meScope currentOperationScope, IComponentRegistration registration, IEnume
  1 parameters)
     at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistrati
  istration, IEnumerable`1 parameters)
     at Autofac.ResolutionExtensions.TryResolveService(IComponentContext con
  Service service, IEnumerable`1 parameters, Object&amp; instance)
     at Autofac.ResolutionExtensions.ResolveNamed[TService](IComponentContex
  ext, String serviceName, IEnumerable`1 parameters)
     at ConsoleApplication1.Features.SubscriptionFeature.DisplaySubscription
  tring browser, String language)
  --WebDriverException
     at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Respons
  rResponse)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandT
  te, Dictionary`2 parameters)
     at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor comman
  tor, ICapabilities desiredCapabilities)
     at lambda_method(Closure , Object[] )
     at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Insta
  ()
  </code></pre>
  
  <p>EDIT : As per Requested here is the detail on the instantiation code.
  I am using C# and Baseclass.Contrib.SpecFlow.Selenium.NUnit to abstract instantiation of webservers. It's using Autofac for IoC. Here is the autofac conf :</p>
  
  <pre><code>&lt;component
        name="IE"
        type="Baseclass.Contrib.SpecFlow.Selenium.NUnit.RemoteWebDriver, Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin"
        service="OpenQA.Selenium.IWebDriver, WebDriver"
        instance-scope="per-dependency"&gt;
          &lt;parameters&gt;
            &lt;parameter name="url" value="http://localhost:5555" /&gt;
            &lt;parameter name="browser" value="InternetExplorer"&gt;&lt;/parameter&gt;
            &lt;parameter name="capabilities"&gt;
              &lt;dictionary&gt;
                &lt;item key="ignoreProtectedModeSettings" value="false"/&gt;
              &lt;/dictionary&gt;
            &lt;/parameter&gt;
          &lt;/parameters&gt;
        &lt;/component&gt;
  </code></pre>
  
  <p>And here is the C# to get the IE webdriver</p>
  
  <pre><code>this.driver = this.container.ResolveNamed&lt;OpenQA.Selenium.IWebDriver&gt;(browser);
  this.driver.Manage().Window.Maximize();
  this.driver.Navigate().GoToUrl(uri);
  //Stuffs
  </code></pre>
  
  <p>I'll try a more simple setup for the sake of this issue clearness.</p>