All Projects → autofac → Autofac.Owin

autofac / Autofac.Owin

Licence: MIT license
OWIN integration for Autofac

Programming Languages

C#
18002 projects
powershell
5483 projects

Autofac.Owin

ASP.NET OWIN integration for Autofac.

Build status

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

Quick Start

To take advantage of Autofac in your OWIN pipeline:

  • Reference the Autofac.Owin package from NuGet.
  • Build your Autofac container.
  • Register the Autofac middleware with OWIN and pass it the container.
public class Startup
{
  public void Configuration(IAppBuilder app)
  {
    var builder = new ContainerBuilder();
    // Register dependencies, then...
    var container = builder.Build();

    // Register the Autofac middleware FIRST. This also adds
    // Autofac-injected middleware registered with the container.
    app.UseAutofacMiddleware(container);

    // ...then register your other middleware not registered
    // with Autofac.
  }
}

Check out the Autofac OWIN integration documentation for more information.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].