-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unexpected Url.Action output with areas #3340
Comments
@ajaybhargavb please take a look. |
Thanks for reporting this and for the repro. I tried this scenario. I can confirm that there is a difference in behavior from MVC 5. Area is not picked up from AmbientValues if a segment before that has changed. MVC 5 did something different in this case. We are discussing what we should do about this scenario. |
cc' @Eilon @danroth27 @rynowak |
Hmm interesting. Yeah I do vaguely recall some special codes in MVC for areas. Though, if I had to guess, I'd be very surprised if that code didn't inadvertently bring this behavior to URL generation. It certainly seems to "violate" a behavior of URL generation, which is to invalidate ambient values that come after a changed parameter... but yes, let's discuss in person. |
Yep. This thing again. It almost destroyed Orchard. |
We discussed about this. It looks like the current area behavior in MVC 5 was not the intended behavior. We have decided not to bring back the same behavior in MVC 6. To make this work you need to explicitly specify the area in the route values. |
Uh oh!
There was an error while loading. Please reload this page.
This is basically the same as #2859, it works without areas, but doesn't always work then area is used
Again this works as expected in MVC5
Given routing in beta8:
And calling this from a controller in area with part = first
results in
while expected output is
/second/admin/accounts
Another strange thing is that it can form a normal url then changing from second part to first one
The text was updated successfully, but these errors were encountered: