Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

RedirectToRouteResult doesn't use RouteName property when calculating destination URL #2545

Closed
michaelnero opened this issue May 12, 2015 · 0 comments
Assignees
Milestone

Comments

@michaelnero
Copy link

The Controller.RedirectToRoute() method creates a RedirectToRouteResult instance and passes in the routeName and routeValues parameters to it, which are assigned to the RedirectToRouteResult.RouteName and RedirectToRouteResult.RouteValues properties, respectively.

However, on line 48 in the RedirectToRouteResult.ExecuteResult() method, the RouteName property is never used to calculate the destination URL; it is essentially ignored.

I would have expected that Controller.RedirectToRoute() method to consider my provided routeName when calculating the destination URL.

The workaround for now, is pretty simple: just calculate my own destination URL using the controller's UrlHelper, but since Controller.RedirectToRoute() didn't behave as I had expected it to, I'm filing an issue for it.

@danroth27 danroth27 added this to the 6.0.0-beta5 milestone May 12, 2015
kichalla added a commit that referenced this issue May 12, 2015
kichalla added a commit that referenced this issue May 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants