在IIS 6.0中创建虚拟目录时正确的文件夹位置? [英] Proper folder location when creating virtual directories in IIS 6.0?

查看:88
本文介绍了在IIS 6.0中创建虚拟目录时正确的文件夹位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio .NET创建新网站时,将在默认网站位置(例如, c:\ inetpub \ wwwroot \ myapp.同样,当使用Visual Studio Web部署项目为此类应用程序创建msi程序包时,将使用自定义操作来确定默认网站的文件夹位置以及安装到该位置的文件.

When creating new web sites with Visual Studio .NET, the projects are created at the default web site location, e.g. c:\inetpub\wwwroot\myapp. Likewise, when creating msi packages for such applications using a Visual Studio Web Deployment Project, a custom action will be used to determine the folder location of the default web site and the files installed to that location.

当我查看当前IIS安装中的其他虚拟目录时,会看到以下逻辑路径:

When I look at other virtual directories in my current IIS installation, I see these logical paths:

IIS帮助:c:\ windows \ help \ iishelp 报告:c:\ Program Files \ Microsoft SQL Server \ MSSQL.3 \ Reporting Services \ ReportManager ReportServer:c:\ Program Files \ Microsoft SQL Server \ MSSQL.3 \ Reporting Services \ ReportServer crystalreportviewers12:C:\ Program Files \ Business Objects \ Common \ 4.0 \ crystalreportviewers12

IISHelp: c:\windows\help\iishelp Reports: c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager ReportServer: c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer crystalreportviewers12: C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12

我的问题是:即使虚拟目录是在默认网站下创建的,c:\ inetpub \ wwwroot确实是正确的使用位置吗?将文件安装到c:\ Program Files \ myapp,创建一个虚拟目录,然后将该虚拟目录指向该文件夹(确保已为该文件夹分配了适当的权限)是否更合适?不能从c:\ inetpub \ wwwroot继承任何权限)?

My question is: Is c:\inetpub\wwwroot really the correct location to use, even if the virtual directory is created under the default web site? Would it not be more appropriate to install the files to c:\Program Files\myapp, create a virtual directory, and then point that virtual directory to that folder (making sure that the proper permissions have been assigned to the folder, as it will not inherit any permissions from c:\inetpub\wwwroot)?

任何与该主题的官方准则有关的链接都将受到欢迎.

Any links to official guidelines on this topic would be most welcome.

推荐答案

我倾向于使vdir指向与源代码相同的文件夹,例如C:\ source \ mywebapp.这样,所有内容都在一个文件夹中,并且源代码管理更加简洁.

I tend to keep vdirs pointing to the same folder as the source code, something like C:\source\mywebapp. This way everything is in the one folder and source control is much cleaner.

另一个原因可能是您的服务器管理员(或您)倾向于仅将OS内容保留在C:上,而将数据或内部应用程序保留在D :(或其他驱动器)上.这样可以使维护更容易,或者只是出于政策考虑.

Another reason could be that your server admin (or you) prefer to keep just OS stuff on C: and keep data or inhouse apps on D: (or some other drive). This can make it easier to maintain or might just be policy.

我建议不要担心自己的vdir指向何处,毕竟它们只是虚拟"的.只需确保您的内容存储在安全合理的位置即可.

I suggest not concerning yourself about where your vdirs are pointed, they are only "virtual" after all. Just make sure that your content is stored in a safe and logical place.

这篇关于在IIS 6.0中创建虚拟目录时正确的文件夹位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆