在IIS 7.5中设置默认WebPage [英] Setting Default WebPage in IIS 7.5

查看:152
本文介绍了在IIS 7.5中设置默认WebPage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装了Intranet IIS服务器的机器上出现了HD问题,我重新安装了所有软件。我已经将站点数据恢复到新的IIS中,但现在,当我在客户端甚至服务器机器的浏览器中键入服务器地址时,它找不到页面(Default.aspx)。我可以允许目录浏览并单击该文件,但显然,我不想要这个替代方案,也不要求用户在URL的末尾键入Default.aspx。

I'd a HD problem in machine where my Intranet IIS server was installed and I've reinstalled all the software. I've restored the site data into new IIS but now, when I type the server address in a browser in a client or even server machine, it doesn't find the page ("Default.aspx"). I can allow "Directory browsing" and click the file but, obviously, I don't want this alternative, neither obligating users to type "Default.aspx" in the end of the URL.

也许这是一个非常简单的配置,但我在IIS中找不到它。

Maybe it's a very simple configuration, but I've cannot found it in IIS.

推荐答案

放入以下内容在网站或应用程序的web.config文件中:

Put the following in site's or application's web.config file:

<system.webServer>
    <defaultDocument>
        <files>
            <add value="~/Default.aspx"/>
        </files>
    </defaultDocument>
</system.webServer>

这篇关于在IIS 7.5中设置默认WebPage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆