diff --git a/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs
index bb45249355..23aace66d4 100644
--- a/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs
@@ -10,6 +10,11 @@ namespace Microsoft.AspNet.Mvc
///
public interface IUrlHelper
{
+ ///
+ /// Gets the for the current request.
+ ///
+ ActionContext ActionContext { get; }
+
///
/// Generates a fully qualified or absolute URL specified by for an action
/// method, which contains action name, controller name, route values, protocol to use, host name, and fragment.
diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/UrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/UrlHelper.cs
index ddf1ae51a6..5c50658abe 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Routing/UrlHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Routing/UrlHelper.cs
@@ -32,9 +32,10 @@ namespace Microsoft.AspNet.Mvc.Routing
ActionContext = actionContext;
}
- protected RouteValueDictionary AmbientValues => ActionContext.RouteData.Values;
+ ///
+ public ActionContext ActionContext { get; }
- protected ActionContext ActionContext { get; }
+ protected RouteValueDictionary AmbientValues => ActionContext.RouteData.Values;
protected HttpContext HttpContext => ActionContext.HttpContext;
diff --git a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/RemoteAttributeTest.cs b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/RemoteAttributeTest.cs
index d7b844f0ac..3fc55468f3 100644
--- a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/RemoteAttributeTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/RemoteAttributeTest.cs
@@ -595,6 +595,8 @@ namespace Microsoft.AspNet.Mvc
_url = url;
}
+ public ActionContext ActionContext { get; }
+
public object RouteValues { get; private set; }
public string Action(UrlActionContext actionContext)