Windows Server 2012上的IIS服务器无法打开网站

时间:2015-12-01 12:39:08

标签: asp.net windows server iis-8 sql-server-2014-express

我在其上运行Windows Server 2012和SQL Express 2014。我在上面设置了IIS并上传了我的网站以及数据库。

我的问题是,当我尝试导航到该页面时,它会自动为我提供http://192.168.0.72/cms/holding.html(给我这个holding.html)页面,但目标网页确实存在,所以我迷失了可能出错的地方。

网站配置文件中的凭据具有所有正确的信息。如果有人可以提供帮助,那将非常感激,或者至少指出我正确的方向。

3 个答案:

答案 0 :(得分:0)

可能是您在web.config中未正确配置默认文档。您可以尝试显式指定默认值以查看是否是这种情况。

<configuration>
   <system.webServer>
    <defaultDocument>
        <files>
            <clear/>     
            <add value="defaultPage.html" />
        </files>
    </defaultDocument>
   </system.webServer>
</configuration>

答案 1 :(得分:0)

  1. 打开Internet信息服务(IIS)管理器:

  2. 在“连接”窗格中,展开服务器名称,展开“站点”,然后导航到要配置默认文档的网站或应用程序。

  3. 在“主页”窗格中,双击“默认文档”。

  4. 在“操作”窗格中,单击“添加...

  5. 在“添加默认文档”对话框中,在“名称”框中键入要添加的默认文档的名称,然后单击“确定”。

  6. 6.如有必要,在“操作”窗格中,选择列表中的默认文档,然后单击“上移”或“下移”以定义IIS应搜索默认文档列表的顺序。

    1. 在“默认文档”警告框中,单击“是”拒绝来自父配置级别的配置继承,或单击“否”或“取消”以取消默认文档顺序中的更改。

    2. 如有必要,请单击“操作”窗格中的“删除”以删除不希望用作默认文档的任何文件名。

答案 2 :(得分:0)

这是配置文件中定义的内容:

<system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="Default.asp" />
                <add value="default.aspx" />
                <add value="Default.htm" />
                <add value="index.html" />
                <add value="home.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
            </files>
        </defaultDocument>
        <httpErrors errorMode="Detailed" />
        <urlCompression doStaticCompression="true" doDynamicCompression="true" />
        <directoryBrowse enabled="false" />
    </system.webServer>