且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我应该将我的 ASP.NET 网站放在 wwwroot 文件夹中吗?

更新时间:2023-11-23 10:34:46

走第二条路.

wwwroot 只是作为服务器默认网站的容器.如果您从 IIS 中删除默认网站,则可以安全地删除此目录.无论如何,您的站点与默认站点无关,因此它们应该位于 inetpub 下的自己的文件夹中.

wwwroot is simply there as the container for the default website for the server. If you delete the default website from within IIS, then you can safely remove this directory. Regardless, your sites have nothing to do with the default, so they should be in their own folders under inetpub.

也就是说,我们有时在同一台服务器上有多种类型"的网站.例如 DEV 和 QA.在这种情况下,我会将其结构为:

That said, we sometimes have multiple "types" of sites on the same server. For example DEV and QA. In this case I would structure it as:

c:inetpubdevsite1
c:inetpubdevsite2

c:inetpubdevsite1
c:inetpubdevsite2

c:inetpubqasite1
c:inetpubqasite2

c:inetpubqasite1
c:inetpubqasite2