在 IIS 6.0 中创建虚拟目录时正确的文件夹位置?

发布于 2024-08-19 04:37:09 字数 696 浏览 3 评论 0原文

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

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

IISHelp: c:\windows\help\iishelp 报告:c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager 报表服务器: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 的任何权限)?

非常欢迎任何有关此主题的官方指南的链接。

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.

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

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

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.

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

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

发布评论

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

评论(3

羞稚 2024-08-26 04:37:09

只要告诉 IIS 路径就没关系。我坚持使用 inetpub/wwwroot 目录。这样我就可以将某些安全站点应用到该路径。它还帮助建立各种安全用户,例如ASP.net和网络用户帐户。

It really doesn't matter as long as you tell IIS the path. I stick to the inetpub/wwwroot directory. That way I can apply certain security sites to that path. It also helps establish various security users such as ASP.net and the network user account.

子栖 2024-08-26 04:37:09

坚持使用标准 c:\inetpub\wwwroot\ 目录来放置应用程序的主要原因之一是 Windows 已在此目录上正确设置了权限以传播到 Web 应用程序的子目录。我建议坚持使用这个标准,这样您的各种站点/应用程序就有一个逻辑中心点。这真的是刚刚组织好的。

现在我不会否认您可以设置额外的根目录,有时,如果您为特定站点有单独的硬盘驱动器等,则在各种客户端/客户站点上都需要这样做。以下是有关为 .net 设置根目录的链接:

http://msdn.microsoft.com/en-us/library/ha2y9493。 ASPX

One of the main reasons to stick to the standard c:\inetpub\wwwroot\ directory for placing your applications is Windows has set up the permissions properly on this directory to propagate to subdirectories for web applications. I would recommend sticking with this standard so you have a logical central point for your various sites/applications. It's really just organized.

Now I won't deny that you can set up additional root directories, and sometimes this is needed at various client/customer sites if you have separate hard drives for particular sites, etc. Here's a link regarding setting up root directories for .net:

http://msdn.microsoft.com/en-us/library/ha2y9493.aspx

姐不稀罕 2024-08-26 04:37:09

我倾向于让 vdir 指向与源代码相同的文件夹,例如 C:\source\mywebapp。这样,所有内容都在一个文件夹中,并且源代码控制更加清晰。

另一个原因可能是您的服务器管理员(或您)更喜欢仅将操作系统内容保留在 C: 上,并将数据或内部应用程序保留在 D: (或其他驱动器)上。这可以使其更容易维护,或者可能只是政策。

我建议不要担心你的虚拟目录指向哪里,它们毕竟只是“虚拟的”。只需确保您的内容存储在安全且合理的位置即可。

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.

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.

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.

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