我正在尝试向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
然后它显示如下:
答案 0 :(得分:1)
在IIS管理器中,通过选择左侧的计算机名称更改为Web服务器级别配置。然后,您将把默认文档添加到每个站点继承的applicationhost.config中。
交替使用appcmd,例如:appcmd.exe set config“MySite”-section:system.webServer / defaultDocument /+"files.[value='FileName.ext']“/ commit:apphost