In an ASP.Net Core webapplication pages are searched from certain paths. For example, the Index page in a Razor Page application is located in the folder "Pages" (by default), which is relative to the application root folder. The page can thus be accessed with the path "/Index".
However, I would want to access the pages by a true absolute path. Which means that the entire path would have to be specified to access the view. On Windows the complete path could be C:/Project/Pages/Index.cshtml. But ASP.Net Core can not handle this by default, becuase this path would be resolved to: /Pages/C:/Project/Pages/Index.cshtml (relative to the application root, which is wrong.
How can I change this behavior so that ASP.Net Core does not interfere in this manner? The reason I want to change this behavior is that on Linux when a path starts with "/", then it points to the root of the filesystem and not to the root of an application. I want the same behavior everywhere.
Note: I do not want to use the tilde character ("~") either.
Thanks!