Visual Web Developer (Express):为开发环境设置文档根目录

发布于 2024-07-04 09:55:08 字数 121 浏览 4 评论 0原文

我正在 Visual Web Dev Express 中开发一个网站,当我运行/调试时,我希望能够设置应用程序的文档根目录,以便我可以使用更安全的路径,例如“/css/style.css” “css/style.css”的内容。

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

神回复 2024-07-11 09:55:08

选择“Web”选项卡,它位于“服务器”部分

Select the "Web" tab and it's in the Servers section

要走就滚别墨迹 2024-07-11 09:55:08
  • 单击解决方案资源管理器中的网站节点。
  • 按 F4 查看属性窗口。
  • 将虚拟路径从 /projectname 更改为 /

请记住,这会影响您期望应用程序/网站的部署方式。 如果在 Web 服务器根目录之外使用它,则 URL 路径将不正确。

  • 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.

送君千里 2024-07-11 09:55:08

我一直在属性窗口中寻找虚拟路径字段,但一直找不到它...它只向我显示以下选项

  • 孔径目录 URL
  • 完整访问 路由
  • 策略 文件
  • 端口
  • 使用动态端口

你知道某个地方吗我还能在哪里找到虚拟路径字段?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文