Will app_offline.htm stop current requests or just new requests?

前端 未结 2 487
时光说笑
时光说笑 2020-12-09 03:02

Like the title says, If I place an app_offline.htm in the application root, will it cut off currently running requests, or just new ones?

2条回答
  •  自闭症患者
    2020-12-09 03:52

    From ScottGu's blog:

    Basically, if you place a file with this name in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).

    App_Offline.htm - ScottGu's Blog

    So, it seems like it will continue processing current request, but stop new incoming requests.

提交回复
热议问题