ASP.NET Default Document

北战南征 提交于 2019-12-02 06:56:57
Darin Dimitrov

You need to configure it in the properties of the virtual directory hosting the ASP.NET application. Put index.html before default.aspx


(source: plus2net.com)

If you do not have access to IIS, and you are hosted on IIS 7 (Windows Server 2008), you may want to put this into your web.config file:

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

Source: How to add a default document with IIS7 web.config

You need to change the order of default document list to bring index.htm to the top, on IIS6 this found on the Documents tab of Properties dialog on the site in IIS manager.

You need to set this up in IIS. In the IIS manager, this will be under the Documents tab.

in your default.aspx page write this in your code behind if you don't have access to IIS.

Response.Redirect("index.htm");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!