using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Security; using System.Web; using Autofac; using Autofac.Integration.Owin; namespace Owin { /// <summary> /// Extension methods for configuring the OWIN p…
There is an example project showing Web API in conjunction with OWIN self hosting https://github.com/autofac/Examples/tree/master/src/WebApiExample.OwinSelfHost https://github.com/autofac/Examples/blob/master/src/WebApiExample.OwinSelfHost/Startup.cs…
using System; using System.Web; using Autofac.Core.Lifetime; namespace Autofac.Integration.Web { /// <summary> /// Provides application-wide and per-request containers. /// </summary> public class ContainerProvider : IContainerProvider { reado…
http://git.oschina.net/shiningrise/AutofacOwinDemo using Microsoft.Owin; using Owin; using System.Web.Mvc; using Autofac; using Autofac.Integration.Owin; using Autofac.Integration.Mvc; using Autofac.Integration.WebApi; using System.Web.Http; using Sy…
using Owin; using Autofac; using Autofac.Integration.Owin; using System.Web; var owin = this.Request.GetOwinContext(); var scop = owin.GetAutofacLifetimeScope(); scop.ResolveOptional()…