title: Self Hosted OWIN WebAPI application won't bind to port when run as a Windows service
body: <p>I have a self hosted OWIN WebAPI application that is currently run from a non-elevated command prompt (running as local administrator) and works fine, accepting connections from the local machine and other machines on the network.</p>
  
  <p>The app start code is:</p>
  
  <pre><code>using (WebApp.Start&lt;Startup&gt;(url: "http://+:9000/"))
  {
      Console.ReadLine();
  }
  </code></pre>
  
  <p>and I have run the following to make sure the app can bind correctly:</p>
  
  <pre><code>netsh http add urlacl url=http://+:9000/ user=administrator
  </code></pre>
  
  <p>Now I'm trying to make it run as a Windows service. I've derived my main class from ServiceBase and moved the <code>WebApp.Start</code> into the <code>OnStart()</code> method. I run the service as the local administrator. The service starts and stays running, with debug logging showing me that it has gone as far as getting to the <code>WebApp.Start</code> line, but the app is not listening on port 9000 on any interfaces.</p>
  
  <p>What have I messed up?</p>