using Owin; using Autofac; using Autofac.Integration.Owin; using System.Web; var owin = this.Request.GetOwinContext(); var scop = owin.GetAutofacLifetimeScope(); scop.ResolveOptional()