有没有办法向 Visual Studio 开发服务器添加虚拟目录?

发布于 2024-08-28 02:12:23 字数 301 浏览 15 评论 0原文

我正在使用具有特定端口的 Visual Studio 开发服务器。有没有办法添加虚拟目录?

编辑:

抱歉,我不太清楚。我希望能够将一个或多个虚拟目录添加到任意物理目录。例如: http://localhost/c_drive/ 将映射到 C:\,http://localhost:/d_drive/ 将映射到 D:\ 等。

I'm using the Visual Studio Development Server, with a specific port. Is there a way to add a virtual directory to it?

EDIT:

Sorry, I wasn't very clear. I'd like to be able to add one or more virtual directories to arbitrary physical directories. For instance: http://localhost/c_drive/ would map to C:\, http://localhost:/d_drive/ would map to D:\, etc.

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

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

发布评论

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

评论(4

琴流音 2024-09-04 02:12:23

Visual Studio 开发服务器的代号为 Cassini。

ASP.NET 2.0:入门指南

Cassini doesn't support virtual directories, security settings, 
or any of IIS's other fancy features; it's just a very simple web server 
that gives you the basics you need to get up and running.

来自我正在使用的 Windows XP Pro 附带的 IIS。它只允许一个网站而不需要调整,但有虚拟目录。据我所知,如果您使用的是 Vista,则可以在 IIS 中设置多个站点。

The Visual Studio Development Server is codenamed Cassini.

From ASP.NET 2.0: A Getting Started Guide

Cassini doesn't support virtual directories, security settings, 
or any of IIS's other fancy features; it's just a very simple web server 
that gives you the basics you need to get up and running.

I am using the IIS which is included with Windows XP Pro. It only allows one website without tweaking but does have virtual directories. If you are on Vista, you can setup multiple sites in IIS from what I have heard.

旧夏天 2024-09-04 02:12:23

是的,您可以在项目属性中指定虚拟路径,例如 /foo 而不是 /

替代文本

Yes, you can specify a virtual path such as /foo instead of / in the properties of your project:

alt text

摘星┃星的人 2024-09-04 02:12:23

最接近 Visual Studio 开发服务器中的虚拟目录的方法是使用操作系统符号链接将网站根目录外部的目录映射到根目录内的路径

http://en.wikipedia.org/wiki/NTFS_symbolic_link

The closest you can get to virtual directories in the Visual Studio Development Server is by using OS symlinks to map a directoty outside of the Web site root to a path within the root

http://en.wikipedia.org/wiki/NTFS_symbolic_link

月竹挽风 2024-09-04 02:12:23

是的,您可以通过命令行启动它来提供物理路径,

C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0\Webdev.WebServer.exe /port:9081 /path:C:\temp\vdir

只需执行 /?查看命令行选项列表

Yes, you can provide a physical path by launching it through command line

C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0\Webdev.WebServer.exe /port:9081 /path:C:\temp\vdir

just do /? for a list of command line options

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