ASP.NET之设置默认文档

通常...

<!--Web.config-->
<configuration>
  <!--指定默认文档 Start
    Author:JAnnn
    Time:2015-01-10
    福利:
    IIS会自动生成Web.config指定的默认文档,
    以后就不用手动在IIS里添加了.
    坑爹:
    指定默认文档错误的话,
    Web访问很慢很慢...
  -->
  <system.webServer>
    <defaultDocument>
      <files>
        <clear/> <!--添加默认文档前先clear下 避免跟IIS默认文档冲突-->
        <add value="amap.html"/> <!-- 位于根目录下-->
        <add value="2.aspx"/> <!-- 找不到1.html 会来找2.aspx-->
        <add value="x/3.aspx"/> <!-- 位于其他文件夹目录下-->
      </files>
    </defaultDocument>
  </system.webServer>
  <!--指定默认文档 End-->
  
</configuration>
原文地址:https://www.cnblogs.com/taadis/p/12126257.html