这里有一个奇怪的。网站已部署到生产环境中,即使在最后一分钟左右访问该网站后,也会尝试将网站带到网站上。一旦进入网站,它很快,但无论出于什么原因,初始请求都会拖延。我在IIS 6 / Win2003R2上使用表单身份验证。
这是跟踪输出,但不确定这是否很快:
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin PreInit
aspx.page End PreInit 0.000724673107894998 0.000725
aspx.page Begin Init 0.00076126993793904 0.000037
aspx.page End Init 0.000788368354078521 0.000027
aspx.page Begin InitComplete 0.000803454070279882 0.000015
aspx.page End InitComplete 0.000818819151596083 0.000015
aspx.page Begin PreLoad 0.000838095344520044 0.000019
aspx.page End PreLoad 0.000853181060721405 0.000015
aspx.page Begin Load 0.000867987411807925 0.000015
aspx.page End Load 0.000924698530120448 0.000057
aspx.page Begin LoadComplete 0.000944254088159249 0.000020
aspx.page End LoadComplete 0.00096045726481997 0.000016
aspx.page Begin PreRender 0.000975263615906491 0.000015
aspx.page End PreRender 0.00109343505948382 0.000118
aspx.page Begin PreRenderComplete 0.00111103506171874 0.000018
aspx.page End PreRenderComplete 0.00112640014303494 0.000015
aspx.page Begin SaveState 0.00208294629624715 0.000957
aspx.page End SaveState 0.00985628061667056 0.007773
aspx.page Begin SaveStateComplete 0.00989231871648492 0.000036
aspx.page End SaveStateComplete 0.00990796316291596 0.000016
aspx.page Begin Render 0.00992276951400248 0.000015
aspx.page End Render 0.0115989602030426 0.001676
此应用程序驻留在VPN中,因此无需外部访问。我该怎么做才能检查网络问题是否可以联系网络人员?
Global.asax中的代码
/// <summary>
/// Fires when the application is started
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Application_Start(object sender, EventArgs e)
{
}
/// <summary>
/// Fires when the session is started
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Session_Start(object sender, EventArgs e)
{
}
答案 0 :(得分:3)
可以是appdomain startup Asp.net website first start is very slow
可以是ASP动态编译http://msdn.microsoft.com/en-us/library/ms366723.aspx
可以是代码签名验证http://rusanu.com/2009/07/24/fix-slow-application-startup-due-to-code-sign-validation/
还有其他类似的模式(DB热身,连接池热身等)。