diff --git a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs index c0224076f8..20a3c443c6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs @@ -70,7 +70,7 @@ namespace Microsoft.AspNet.Mvc private static ActionDescriptorsCollection GetAndValidateActionDescriptorsCollection(HttpContext httpContext) { - var provider = httpContext.ApplicationServices + var provider = httpContext.RequestServices .GetService(); var descriptors = provider.ActionDescriptors; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Formatters/TempInputFormatterProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Formatters/TempInputFormatterProvider.cs index a081ac0e76..0709fed323 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Formatters/TempInputFormatterProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Formatters/TempInputFormatterProvider.cs @@ -21,8 +21,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding if (formatters == null) { - formatters = context.HttpContext.ApplicationServices.GetService>() - .ToArray(); + formatters = context.HttpContext.RequestServices.GetService>() + .ToArray(); _formatters = formatters; }