有没有办法向 Visual Studio 开发服务器添加虚拟目录?
我正在使用具有特定端口的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Visual Studio 开发服务器的代号为 Cassini。
ASP.NET 2.0:入门指南
来自我正在使用的 Windows XP Pro 附带的 IIS。它只允许一个网站而不需要调整,但有虚拟目录。据我所知,如果您使用的是 Vista,则可以在 IIS 中设置多个站点。
The Visual Studio Development Server is codenamed Cassini.
From ASP.NET 2.0: A Getting Started Guide
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.
是的,您可以在项目属性中指定虚拟路径,例如
/foo
而不是/
:Yes, you can specify a virtual path such as
/foo
instead of/
in the properties of your project:最接近 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
是的,您可以通过命令行启动它来提供物理路径,
只需执行 /?查看命令行选项列表
Yes, you can provide a physical path by launching it through command line
just do /? for a list of command line options