如何在IIS 7.5中加载index.asp

时间:2016-03-18 08:11:25

标签: iis iis-7

我想在IIS中加载一个站点/应用程序。文件夹的根目录包含web.config和index.asp。子文件夹是asp,脚本,样式,图像。

我在IIS中添加添加网站,定义index.asp位置的物理路径,为主机名分配IP地址我尝试了本地主机,IP,并将其留空。当我点击浏览网站时,我收到HTTP 500内部服务器错误。 IIS正在运行,网站在“管理网站”菜单中启动。

如果我编写一个简短的index.html hello world页面并将其设置为默认文档,则显示确定。当我将默认文档更改回index.asp时,我再次收到500错误。

有人可以给我一个关于如何继续的提示吗?

这是我的web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<identity impersonate="true" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="index.asp" />
</files>
</defaultDocument>
</system.webServer>
</configuration>

1 个答案:

答案 0 :(得分:0)

这最好是猜测,因为500可以表示没有子状态代码的任何东西。这可能是由于配置继承。 index.asp已经位于服务器级别的默认文档列表中。通过添加index.asp,当配置继承被展平为有效配置时,可能会导致唯一的hey违规。

<强>建议:

添加&lt; clear /&gt;元素正上方&lt; add value =&#34; index.asp&#34; /&GT;然后再试一次。否则,我们需要获取该500的子状态代码以获取更多信息。 IIS日志通常包含sc-substatus中的子状态。

产生的配置

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <identity impersonate="true" />
    </system.web>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.asp" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

如果这样做,那么它最初适用于index.html的原因是因为index.html不在默认文件列表中。

附加说明

我能想到的另一件事是启用了模拟。如果在集成管道模式下运行应用程序池,则需要关闭集成模式配置验证。可以在此处找到更多信息:Integrated Pipeline mode configuration validation.

新的结果配置

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <identity impersonate="true" />
    </system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="False" />
        <defaultDocument>
            <files>
                <clear />
                <add value="index.asp" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>
相关问题