-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Relative Controller View routing inconsistent with 2.0 update. #6672
Comments
@chad-ramos, here's the convention for view discovery:
If you intended to return a relative path, you have to do Further detailsWhen you run your application using @Eilon, the view engine does work to resolve path traversals when looking up paths (a) do something similar when doing a |
Makes sense and explains why pre-compilation causes an error. Few things...
Best, Chad |
@chad-ramos the view engine allows lookup by names for instance when you do |
@pranavkm Fair enough. Based on that, yes, it would appear throwing for nondeterministic cases would be the desired result. Thanks, Chad |
What exactly are the "non-deterministic" cases we're talking about here? What exactly are we proposing that we could change in the behavior? |
@Eilon |
@Eilon yet another variant is when you pass do |
@pranavkm - do we have some existing code for doing path canonicalization? It seems that if the system always goes through some sort of canonicalization then both runtime-compiled and pre-compiled views would work. |
@Eilon we spoke about addressing this by treating things with slashes as paths. |
We addressed this issue by resolving the value |
Issue
Prior to 2.x, scoping to a view like so...
...was valid when publishing assets produced by...
Details
dotnet publish -c Release
and deploying them, relative routing fails and ultimately produces a 404.dotnet publish -c Release
, previously mentioned error(s) are no longer present.Expected Behaviour
I have zero issues with removing relative pathing to my Views. That being said, there appear to be some inconsistencies that would lead to confusion.
CC - @DamianEdwards @pranavkm
Best,
Chad
The text was updated successfully, but these errors were encountered: