0

我正在尝试将一个添加Default Document到我的IIS 7网站,当我将它添加到条目类型列中时,它显示的是本地而不是继承?我如何使它继承?当我关闭它并返回它时,我刚刚添加的文件消失了。这是我要做的步骤。

1. Left click on site name in the pane
2. Double click on the Default Document icon
3. Click the Add button in the upper right
4. Type in the name of the file 
5. Hit Ok

然后它显示如下:

在此处输入图像描述

4

1 回答 1

1

在 IIS 管理器中,通过在左侧选择您的机器名称更改为 Web 服务器级别的配置。然后,您将向每个站点继承的 applicationhost.config 添加默认文档。

交替使用 appcmd,例如:appcmd.exe set config "MySite" -section:system.webServer/defaultDocument /+"files.[value='FileName.ext']" /commit:apphost

于 2014-07-30T05:32:06.263 回答