title: How do you do dependency injection with AutoFac and OWIN?
body: <p>This is for MVC5 and the new pipeline.  I cannot find a good example anywhere.</p>
  
  <pre><code>public static void ConfigureIoc(IAppBuilder app)
  {
      var builder = new ContainerBuilder();
      builder.RegisterControllers(typeof(WebApiApplication).Assembly);
      builder.RegisterApiControllers(typeof(WebApiApplication).Assembly);
      builder.RegisterType&lt;SecurityService().AsImplementedInterfaces().InstancePerApiRequest().InstancePerHttpRequest();
  
      var container = builder.Build();
      app.UseAutofacContainer(container);
  }
  </code></pre>
  
  <p>The above code doesn't inject.  This worked fine before attempting to switch to OWIN pipeline.  Just can't find any information on DI with OWIN.</p>