ASP.NET 2.0 的 App_Offline.htm

   

    在ASP.NET 2.0 站点根目录下,只要存在 App_Offline.htm 文件,那么所有对.aspx的请求都将转向App_Offline.htm 。而且浏览器的地址栏显示的是所请求的.aspx的URL。
    这样当我们的站点需要维护时,只要把App_Offline.htm 拷贝到站点根目录下即可。

   注意事项:
  (1)IIS 不能 Stop。
  (2)只有对.aspx文件的请求才自动转到App_Offline.htm文件;如果请求的是.htm文件,则不会。

    Tip: Make sure the app_offline.htm file is large enough (512 bytes) to disable the IE “friendly http errors” feature.

posted on 2007-09-06 16:31  残叶  阅读(207)  评论(0编辑  收藏  举报

导航