Virtual paths - still a thing? #59458
Unanswered
AndrewTriesToCode
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that the default templates still use a lot of virtual paths (e.g. they start with "~/") in the layout files for things like CSS and script references. This was causing some issues in an advanced use case where I was programmatically manipulating the request
PathBase
causing these "virtual path" based urls to fail. It seems they act like relative paths.Are these a relic of the past or do they still server a purpose in a modern .NET app? The most recent documentation I've found is regarding IIS specific functionality.
Is there any other documentation on what these mean in modern .NET apps? Should they be used in the default template projects?
Edit: I found the source code and it just postpends the given path to
PathBase
.Beta Was this translation helpful? Give feedback.
All reactions