From 14c43c351d224654315cff6941d9cc6a09c07f0b Mon Sep 17 00:00:00 2001 From: Yishai Galatzer Date: Mon, 16 Jun 2014 19:17:12 -0700 Subject: [PATCH] Use request services instead of application services by default --- src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs | 2 +- .../Formatters/TempInputFormatterProvider.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }