diff --git a/src/Microsoft.AspNet.Hosting/HostingServices.cs b/src/Microsoft.AspNet.Hosting/HostingServices.cs index a90b3232bc..ed8ac10442 100644 --- a/src/Microsoft.AspNet.Hosting/HostingServices.cs +++ b/src/Microsoft.AspNet.Hosting/HostingServices.cs @@ -54,12 +54,7 @@ namespace Microsoft.AspNet.Hosting // TODO: Do we expect this to be provide by the runtime eventually? yield return describer.Singleton(); - yield return new ServiceDescriptor - { - ServiceType = typeof(IContextAccessor<>), - ImplementationType = typeof(ContextAccessor<>), - Lifecycle = LifecycleKind.Scoped - }; + yield return describer.Scoped(typeof(IContextAccessor<>), typeof(ContextAccessor<>)); if (PlatformHelper.IsMono) {