app_offline.htm 会停止当前请求还是只是新请求? [英] Will app_offline.htm stop current requests or just new requests?
问题描述
正如标题所说,如果我在应用程序根目录中放置一个 app_offline.htm
,它会切断当前正在运行的请求,还是只是新的请求?
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?
推荐答案
这是我的蹩脚实验;我使用以下代码创建了一个 ASPX 页面:
Here is my lame experiment; I created an ASPX page with the following code:
protected void Page_Load(object sender, EventArgs e)
{
Response.BufferOutput = false;
Response.Write("Step 1<br />");
System.Threading.Thread.Sleep(10000);
Response.Write("Step 2<br />");
System.Threading.Thread.Sleep(10000);
Response.Write("Step 3<br />");
}
这段代码简单地介绍了一些 loooong 页面加载.我访问了该页面,并在它加载时创建了一个app_offline.htm"文件.然后我加载了另一个 Web 浏览器并确认该应用程序处于脱机状态.然后我重新访问了我的加载"请求......它一直完成到第 3 步.
This code simply introduces some loooong page loads. I accessed the page and while it was loading, I created an "app_offline.htm" file. I then loaded another web browser and confirmed the application was offline. I then re-visited my "loading" request...it completed all the way to step 3.
这确认当前请求已完成加载并且新请求被拒绝.
This confirms that current requests finish loading and new requests are turned away.
这篇关于app_offline.htm 会停止当前请求还是只是新请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!