Different Default Document for IIS Sub Application

人走茶凉 提交于 2019-12-02 07:20:17

In order to accomplish this and preserve the setup implemented in our sites I needed to add a location tag around the System.WebServer element in the root site web.config and specify the default document in there as follows where the path is the VirtualDirectory/Application name:

<location path="VirtualDirectoryName">
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="Document.asp" />
            </files>
        </defaultDocument>
    </system.webServer>
</location>
<location path="VirtualDirectoryName2">
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="AnotherDocument.asp" />
            </files>
        </defaultDocument>
    </system.webServer>
</location>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!