Visual Web Developer (Express): Setting Document Root for Dev Environment
-
09-06-2019 - |
Question
I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this?
Solution
- Click on the web site node in the solution explorer.
- Press F4 to see the properties window.
- Change the virtual path from /projectname to /
Bear in mind that this has an impact on how you expect the application/web site to be deployed. If it is ever used outside the root of a web server, the URL paths will be incorrect.
OTHER TIPS
I have been looking for the virtual path field in the properties window but haven't been able to find it... it only shows me the following options
- aperture directory URL
- complete access route
- policy file
- port
- use dynamic port
Do you know of some place else where I could find the Virtual Path field?
Select the "Web" tab and it's in the Servers section
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow