Global.asax に次のコードがあります。
void Application_EndRequest(object sender, EventArgs e)
{
HttpApplication application = sender as HttpApplication;
HttpContext context = application.Context;
string path = context.Request.Path;
string contentType = context.Response.ContentType;
System.Diagnostics.Debug.WriteLine("-----------------------------------");
System.Diagnostics.Debug.WriteLine("Path: " + path);
System.Diagnostics.Debug.WriteLine("ContentType:" + contentType);
}
サイトのルート (~/Help) に、静的な .htm ファイルを含む Help フォルダーがあります。これらのファイルのすべてが EndRequest を介して実行されているわけではないことに気付きました。ページ内のアセット (.js ファイルなど) がログに記録されているのに、htm ファイル自体がログに記録されていないことがあります。時々、ログに記録されます。
これらのファイルのすべてが EndRequest を介して実行されないのはなぜですか?どうすれば確実に実行できますか?