在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.

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2021-12-11
  • 2021-07-10
  • 2021-11-18
  • 2021-09-27
  • 2022-02-25
相关资源
相似解决方案